Set default format of datetimepicker as dd-MM-yyyy

后端 未结 5 1604
情歌与酒
情歌与酒 2021-02-02 08:14

I have a datetimepicker which on loading of windows form shows me format in \'MM-dd-yyyy\',

as follows:

\"en

5条回答
  •  深忆病人
    2021-02-02 08:29

    Try this,

    string Date = datePicker1.SelectedDate.Value.ToString("dd-MMM-yyyy");
    

    It worked for me the output format will be '02-May-2016'

提交回复
热议问题