Time format selection

this is my code:

dateTimePicker1.ShowUpDown = true; dateTimePicker1.CustomFormat = "HH:MM"; dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom; 

Hi, I am using a Custom format for my dateTimePicker until I show the second one, but its format will hide AM / PM in dateTimePicker, as you can show AM / PM in this format

+4
source share
1 answer

just add tt for AM/PM .

 dateTimePicker1.CustomFormat = "HH:mm tt" 

and it should be mm in minutes.

+5
source

All Articles