I have a stored procedure to generate report using the SQL Server Reporting Services. Stored Procedure returns results and has one date column.
Now i would like to display the date in Aug 5 2009, 11:20:AM format instead of showing MM/DD/YYYY so i have cast the date as follows in select query inside the Stored Procedure [select col1, col2, cast(datecol as varchar(max) …)]. This has helped me get the date displayed in correct format i wanted but the columns are getting sort as per text(A-Z) instead of the date.
Can someone tell me what should i do so that i am able to get the date in expected format and still be able to sort the column like its Date not String?
Send the data as a date, and use reporting services
Formatmethod to change the way it is displayed.See this thread for description of the parameters to use
So you’ll end up using something like this expression: