this is my code:
dateTimePicker1.ShowUpDown = true;
dateTimePicker1.CustomFormat = "HH:MM";
dateTimePicker1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
Hi I use Custom Format for my dateTimePicker
until do not show second but its format hide AM/PM in dateTimePicker how can show AM/PM in this format
Display the current date and time in a date pickerClick the Data tab. In the Data type box, click Date and Time (dateTime). Click Format. In the Date and Time Format dialog box, in the Display the time like this list, click the option that you want, and then click OK.
$("#txtDate"). datepicker({ dateFormat: 'yy-mm-dd' });
just add tt
for AM/PM
.
dateTimePicker1.CustomFormat = "HH:mm tt"
and it should be mm
for minutes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With