我想在文本框中添加日期和时间,然后在下一个文本框中自动出现下一个月的自动日期 [英] i want to add a date and time in textbox then next date of month automatical appear in next textbox
本文介绍了我想在文本框中添加日期和时间,然后在下一个文本框中自动出现下一个月的自动日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在文本框中添加日期和时间,然后在下一个文本框中自动显示下个月的日期
i want to add a date and time in textbox then next date of month automatical appear in next textbox
推荐答案
这很简单只需使用DateTime类
It is simple just use DateTime class
DateTime now = DateTime.Now;
Textbox1.Text = now.ToString()
它将动态更新每页上传的日期和时间
it will dynamically update date and time on each page upload
DateTime txtbox1_date = DateTime.Parse(DateTime.Now.ToString());
DateTime txtbox2_date = txtbox1_date.AddDays(1);
这篇关于我想在文本框中添加日期和时间,然后在下一个文本框中自动出现下一个月的自动日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文