Helen Neely
Helen Neely

Reputation: 4740

Format time in SSRS

I have this code in SSRS Reporting: =": " + First(Fields!MY_TIME.Value, "MYDATASET") which prints the time in 02:31:15. But what I really want is to be able to change it to 12hour time style. E.g 2:31:15 PM.

Is there a way to do this? I tried using =format(Fields!MY_TIME.Value, "h:mm:ss tt") but it kept complaining of the dataset.

Any help would be appreciated

Upvotes: 0

Views: 120

Answers (1)

papermoon88
papermoon88

Reputation: 476

Instead of formatting with an expression, you can directly change the format in the textbox Properties window. Select the textbox you want formatted, go to the Properties window (shortcut F4), and put in h:mm:ss tt in the Format box to get your desired 12 hr format.

enter image description here

enter image description here

Upvotes: 1

Related Questions