I am using SQL Server Reporting services 2005 to generate reports. In one of my fields, i am getting the time value as 07:00:00 PM. I want to format the time to be shown in 24 hour format. For example: 19:00:00
How to format the time to be shown in 24 hour format?
The formats supported by SSRS does not include 24 hour format so for that you need to write custom expression.
you can write the custom expression something like
=iif(right(2,time) ='PM',left(2,time)+12,"") // try to put the correct code ,this is just the idea.
Choose the AM and PM format ,then the logic should be if the right 2 charachters are PM then add 12 to the hour part of the time,which should give you 24 hour format. This is just idea ,trythis out .
Hope you will get the solution.
Let me know if you got the solution.