Detlef D Soost
Detlef D Soost

Reputation: 98

Stringformat WPF with Date and additional string

I want to format a Datetime in my textbox like this: 08.05.2018 12:18 Uhr

Text="{Binding CreationDate, StringFormat=dd.MM.yy hh:mm}"

This is what I've got until now, but the "Uhr" is missing.

Upvotes: 1

Views: 134

Answers (1)

Alfred Manoj
Alfred Manoj

Reputation: 106

This worked for me

<TextBlock Text="{Binding MyDate,StringFormat=dd.MM.yyyy hh:mm U\\hr}"  />

Upvotes: 2

Related Questions