如何从日历控件获取从开始日期到结束日期的工作日 [英] how to get working days from strat date to end date from calendar control
本文介绍了如何从日历控件获取从开始日期到结束日期的工作日的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我从日历中选择一个日期时,它将从所选日期开始计算下一个日期.
我要从选择日期算起.
示例-我选择一个日期为DEC的15号,我希望从所选日期中选择下一个第3个日期.
DEC 12月18日,但我想工作几天.所以我要回答.是12月17日.
我正在使用此代码.
when i select a date from calendar it counts next date from selected date.
i want a count from select date.
example- i select a date 15th DEC and i want next 3rd date from selected date.it give
18th DEC but i want working days.so i want ans. is 17th DEC.
i am using this code.
dt = dt.AddDays(Convert.ToInt32(txtadd.Text))
dt是日期时间.
请帮助我.
where dt is date time.
Please help me.
推荐答案
这可能会有所帮助:
业务日期计算 [ http://stackoverflow.com/questions/1617049/calculate-两次交易之间的交易日数 [
This might help:
Business Dates Calculation[^]
http://stackoverflow.com/questions/1617049/calculate-the-number-of-business-days-between-two-dates[^]
这篇关于如何从日历控件获取从开始日期到结束日期的工作日的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文