Search code examples
reporting-servicesssrs-2008ssrs-2012

SSRS Convert string 12 hour time to 24 hour time


In my data set I have a string value 1:43 PM. I would like to convert this to 13:34. I have set the text box property to this enter image description here

But it does not make any change the time still shows as 1:43 PM. IS there anyway to make this conversion?


Solution

  • It looks like your time is coming in as a string so you would need to convert the string before you could get the time.

    =CDATE("1:43 PM")
    
    =CDATE(Fields!TIME_FIELD.Value)
    

    and then your format property will format it to the desired result.