Reputation: 635
i want to display Hour and Min in XAML binding,,
for example 13:20, 5.30 ....etc
for that, i wrote something like this :
Text="{Binding BookedFrom,StringFormat='{}{0:HH:mm'}"
but it is not working
can you give me correct formatting?
Upvotes: 0
Views: 2544
Reputation: 1341
You can try the following
Text="{Binding BookedFrom,StringFormat=t}"
or
Text="{Binding BookedFrom,StringFormat=HH:mm}"
Upvotes: 1
Reputation: 17155
It should be:
Text="{Binding BookedFrom,StringFormat={}{0:HH:mm}}"
Upvotes: 3