dateTimePicker 获取自定义日期值

MessageBox.Show(dateTimePicker1.Value.ToString("yyyy-MM-dd 00:00:00"));

 

 

dateTimePicker1.Value.ToString("yyyy-MM-dd   :   HH:mm:ss")

 

 

MessageBox.Show(string.Format("{0:d}",dateTimePicker1.Value));

你可能感兴趣的:(datetimepicker)