Click here to Skip to main content
15,891,316 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have a report that has two parameters, Start Date and End Date, the report works but I have noticed that the date format is incorrect. So when the date picker queries a value greater than 12 it returns no records as it thinks it's month 13 !

So the parameters are passing the date back as dd/mm/yyyy to my dataset, but the query within the dataset is returning values of mm/dd/yyyy. How can I fix this ?

Cheers

Nick
Posted

you can convert the Date parameter into specific format of date

e.g select CONVERT(VARCHAR(10), CONVERT(datetime, FromDate, 1), 101) from table1
it will convert the date in mm/dd/yyyy format.

then you can do whatever operation you want to perform.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900