I have a reporting services report which has a dataset based on the SQL snippet below.
I have designed the report in reporting services and have set the date parameters to DateTime (so i get the calendar datepicker). However, I cannot run the report because it says the datetime is formatted incorrectly.
Can anyone help?
@locationID NVARCHAR(15),@fromDate DATETIME,@toDate DATETIME
WHERE [Location ID]=@locationID AND DateViewed BETWEEN @fromDate AND @toDate
-- The following query works --
WHERE [Location ID]='LOC001' AND DateViewed BETWEEN '20041231' AND '20061231'