I have a datetimepicker which on loading of windows form shows me format in 'MM-dd-yyyy',
as follows:
I would like it in dd-MM-yyyy
.
I tried the following:
set custom format: "dd-MM-yyyy"
But Its not changing.
What could be the problem?
Please help me.
Ensure that control Format property is properly set to use a custom format:
DateTimePicker1.Format = DateTimePickerFormat.Custom
Then this is how you can set your desired format:
DateTimePicker1.CustomFormat = "dd-MM-yyyy"