August 13, 2008 at 10:39 pm
Hi Guys,
I am having a stored proc with date parameter and datetime datatype.........something like this...
Exec sp_report_temp @EndDate
Now whenever I execute the above stored proc, I want in the 'preview' tab to be shown with a small calender button so that i can select whatever date i want from that calender. For this purpose, in the report parameters, I am using Datetime datatype instead of string datatype for EndDate.
But for some reason, I am not able to get exactly what I want.....like....when i click the calender button and select 4th of Jan (4/01/2008), its showing the values for 1st of April (01/4/2008) and when i click and select 30th of Dec (12/30/2007), its showing the following error :
"An error occured during local report processing.The value provided for the report parameter 'EndDate' is not valid for its type."
Does anyone have a clue how to resolve this issue???
Any help is really appreciated...
Thanks.
August 14, 2008 at 3:58 am
Hi,
It is with your date format. Make sure which dateformat your machine is using. In some cases you will not get error because 01/04/2008 might be USA format and it converts to uk format as 01/01/2008 and it will work. but when it try to convert 12/30/2008, it cant convert to 30/12/2008 as there is no month in that range.
I can say it is problem because it tries to convert the date format according to your machine format. Best thing is you convert the date format into stored procedure as it is in your table.
You can use following link to convert date time format.
http://www.mssqltips.com/tip.asp?tip=1145
hope it helps.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply