如何从今天的日期计算8个工作日? [英] How to calculate 8 business days from today's date?
问题描述
我有,我想通过今天的日期subtacting 8个工作日来寻找日期的情况。假设如果今天的日期是10年4月21日。现在我要显示的日期是4月9日/ 10.Weekends应排除在外。
I have a scenario where i want to find the date by subtacting 8 business days from today's date. Suppose if today's date is 04/21/10 .Now i want to show the date to be 04/09/10.Weekends should be excluded.
例如。
如果今天的日期是10年4月21日
For Example. If today's date is 04/21/10
减去周末:
Saturday- 04/10/10 04 /一十分之十七
周日-04/11 / 10,04 / 18/10
Subtract Weekends : Saturday- 04/10/10 ,04/17/10 Sunday-04/11/10,04/18/10
输出出来是04/09/10。
The output comes out to be 04/09/10.
我想用C#来做到这一点。
I would like to do this with C#.
任何帮助或建议将是有益的。
Any help or suggestion would be helpful.
谢谢,
萨米特
Thanks, Sumit
推荐答案
您可以在这里找到一些很好的解释
You can find the some good explanation here
的http://$c$casp.net/blogs/Vijjendra/microsoft-net/765/calculate-business-days-in-asp-net-c
这篇关于如何从今天的日期计算8个工作日?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!