1

How do I milliseconds to my string format. Here's what I have:

<wpfTool:DateTimePicker
                        x:Name="DTP_To_TAtab" 
                        Format="Custom" 
                        FormatString="M/d/yyyy HH:mm:ss"
                        TimeFormat="Custom"
                        TimeFormatString="HH:mm:ss"

I want the time to look like this:

14:15:16.123

1 Answer 1

1

This should do it

HH:mm:ss.fff
Sign up to request clarification or add additional context in comments.

2 Comments

it allows you to enter numbers but when you click somewhere else or click enter the numbers are reverted back to 000 @Dtex
Seems like DateTimePicker internally is using a custom converter that will ignore the milliseconds part of the text. I don't know if you can provide your own custom converter without rewriting the source code.

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.