Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to set dateTimePicker To 24 Hours Format
[HH:MM:SS:AM]
[14:15:12:PM}
Posted
Updated 9-Aug-20 20:23pm
Comments
Hi anushikaroshan494,

You can accept both the answers, there is no problem. :)

Thanks,
Tadit

Use DateTimePicker.CustomFormat Property[^] and provide format property as HH:mm:ss tt.
 
Share this answer
 
v2
C#
//Assuming your DateTimePicker is called dateTimePicker1...

dateTimePicker1.Format = DateTimePickerFormat.Custom;
dateTimePicker1.CustomFormat = "HH:mm:ss tt";


DateTimePicker Format[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900