在datetimepicker中添加日期 [英] adding date to datetimepicker
本文介绍了在datetimepicker中添加日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嘿huys
实际上,我正在使用图书馆管理系统,一切正常,但是我想将接收日期设置为相对于发布日期自动填写,因此请帮助我
hey huys
actually i am doing a library management system , every thing is alright but i want to set the receiving date to be filled automatically with respect to the issue date so please help me
推荐答案
如果我想在今天的日期前增加10天,那么这就是您可以采用的方法.
If I wanted to add 10 days onto todays date, then this is how you could do it.
dateTimePicker1.Value = DateTime.Now.AddDays(10);
或者您可以使用新的DateTime设置它
or you can set it with a New DateTime
dateTimePicker1.Value = new DateTime(2012,4,7);
这篇关于在datetimepicker中添加日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文