want to display 24 hours time and date with datatype Datetime (Not String) in SSRS
Hi All, I want to display 24 hours time and date in SSRS & for that I am using Format(now,"MM/dd/yyyy HH:mm:ss") but I am using this expression in Parameter, where I need to define datatype of that parameter as DateTime, not string. For Expression Format(now,"MM/dd/yyyy HH:mm:ss"), If I use DateTime datatype, It is showing error but working with String datatype. For example: I have parameter To Date and value of this parameter should be 10/11/2010 13:09:16 (To Date: 10/11/2010 23:09:16) , not in AP or PM format and datatype of this parameter, want to keep DateTime that I can select value from Calender. Please suggest me how I can achieve this?. I don't want to do it in stored Procedure side, want to do it in report side.Thanks Shiven:)
October 11th, 2010 3:07pm

If you leave the format blank, SSRS will use exactly what is coming from the procedure. (will keep the date as a date and keep the 24 hour time) Otherwise to show the second, use: h:mm tt (the "tt" is for the seconds.. and notice there is no : between the minutes and seconds)
Free Windows Admin Tool Kit Click here and download it now
October 11th, 2010 8:01pm

Hi PMP07 If you have system just create one parameter (Datatype other than datetime) and in default value give now and then see what it will diplay in preview. If data type is other than datetime, Calender will not appear and we can't select value from calender. If data type is Datetime Calender is appearing but it is displaying date time is AM PM format not in 24 hours format. I hope now you are clear with my requirement. Thanks Shiven:)
October 12th, 2010 7:35am

Formatting this at the report level is not possible , for that you can try below solutions 1. Try the solution in the below link http://geekswithblogs.net/naijacoder/archive/2008/06/26/123422.aspx 2. Change the date and time format in your machine from where the report is getting launched.
Free Windows Admin Tool Kit Click here and download it now
October 12th, 2010 9:45am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics