现有的计算允许5个日历日,但它应该允许5个工作日。 [英] The existing calculations allows 5 calendar days but It should allows 5 business days.

查看:189
本文介绍了现有的计算允许5个日历日,但它应该允许5个工作日。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现有计算允许在计划表日期的5个工作日内进行逆止器估算,但由于批次活动在周末推迟,因此需要调整为允许5个工作日。

现有计算第一个预期的账单日期保留在将+5日历元素更改为5个工作日的一侧,我们应该排除星期六/星期日/银行假日。



例如:今天的日期是05/01/2016如果我们在今天的日期加上+5它应该是2016年10月1日所以我们有两个周末所以应该排除09,10然后将2天添加到预期的第一个账单日期



如果我们在2016年5月1日至2016年1月10日之间获得任何银行假期,我们应该在预期的第一张账单上加+1天,如果我们获得2个银行假期则添加+2天到第一个预计账单日期。

所以我们有2个银行假期和2个周末,预期结果应该2016年1月14日。

解决方案

尝试阅读 sql server 2005 - 工作日计算 - 堆栈溢出 [ ^ ]

The existing calculations allows for 5 working days ofter the schedule meter date for backstop estimation but, due to the batch activity being postponed at weekend this needs adjust to allow 5 working days.
Existing calculations of first expected bill date is retained a side from changing the +5 calender days elements to 5 working days we should exclude Saturday /Sunday / bankholidays.

Ex: today date is 05/01/2016 if we add +5 to today date it should come 10/01/2016 so there are two weekends we ve got so should exclude 09,10 and then add 2 days to expected first bill date

If we get any bank holidays between 05 /01 /2016 to 10/01/2016 we should add +1 days to expected first bill, if we get 2 bank holidays then add +2 days to first expected bill date.
so we have got 2 bank holidays and 2 weekends, the expected result should be 14/01/2016.

解决方案

Try reading this sql server 2005 - Business Days calculation - Stack Overflow[^]


这篇关于现有的计算允许5个日历日,但它应该允许5个工作日。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆