将小时或分钟添加到当前时间 [英] Add hours or minutes to the current time
本文介绍了将小时或分钟添加到当前时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将时间增加到当前时间.
I want to increase time to current time.
例如,我有问题的时间和完成问题的预期时间.我该如何添加?
For example, I have the time of the problem and the expected time to complete them. How can I add to it?
(DateTime.Now.ToShortDateString() + ...)
推荐答案
您可以使用其他变量:
DateTime otherDate = DateTime.Now.AddMinutes(25);
DateTime tomorrow = DateTime.Now.AddHours(25);
这篇关于将小时或分钟添加到当前时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文