1

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.

2
  • 2
    StringFormat=dd.MM.yy hh:mm U\\hr, the double backslash escapes the format character h. IMO adding Uhr is antiquated, you'll easily notice that there is a time without it. Commented May 8, 2018 at 10:23
  • thank you :) you're right, I won't add "Uhr" Commented May 8, 2018 at 10:45

1 Answer 1

2

This worked for me

<TextBlock Text="{Binding MyDate,StringFormat=dd.MM.yyyy hh:mm U\\hr}"  />
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.