日期时间选择器 [英] date time picker
本文介绍了日期时间选择器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将所有选定日期的日期时间选择器的时间设置为12:00 AM.
i want to set the time of the date time picker to 12:00 AM for all the selected dates.
All your advices are appreciable!
推荐答案
DateTimePicker.Value = new DateTime( ^ ]);
DateTimePicker.Value = new DateTime(You take it from here[^] );
这样的事情怎么样:
How about something like this:
dateTimePicker1.Format = DateTimePickerFormat.Custom;
dateTimePicker1.CustomFormat = "12:00 dd MMMM yyyy";
也许应该是:
Or maybe it should be:
dateTimePicker1.CustomFormat = "''12:00'' dd MMMM yyyy";
http://msdn.microsoft.com/en-us/library/h2ef6zxz.aspx [ ^ ]
祝你好运!
http://msdn.microsoft.com/en-us/library/h2ef6zxz.aspx[^]
Good luck!
myDateTimePicker.Value = myDateTimePicker.Value.Date;
这篇关于日期时间选择器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文