SPD: How to change 24hr format to 12hr format AM/PM
I’ve found this question in forum – but since it was not easy to explain by sentences, I would like to create a sample working option here.
For example you have this list as data source:
In the data source you have 24hr format (I use string type for my sample, but you can use normal DateTime).
In SharePoint, to display the 24hr format in 12hr format, you need to use DataFormWebpart + proper ddwrt function like this:
The ddwrt function you need to play is:
[Field] is the field where you have the data, in this case internal name of “24hr format”.
1033 is the culture
5 is the predefined format , you can use ‘M/d/yyyy hh:mm:ss tt’ instead.
And the final result will be,