Reputation: 460
I got here
<TextBox IsReadOnly="True" x:Name="SessionTimeColumnTextBox
Binding="{Binding TreatmentTime, StringFormat=HH:mm}"
Visibility="Visible"
/>
but it shows hundred hours such as 17:32 instead of 5:32PM, how can I reformat the time into not hundred hours?
Upvotes: 0
Views: 6437
Reputation: 73502
You're using the wrong format. HH
means 24 hours format. Use hh
for 12 hours format and tt
for AM/PM designator.
StringFormat=hh:mmtt
Refer Custom Date and Time Format Strings
Upvotes: 3