在sharepoint 2010中计算不包括周末和公众假期的天数

时间:2013-08-02 08:19:08

标签: sharepoint-2010

在sharepoint 2010计算列中计算开始和结束时间之间的天数时,如何排除周末(坐着和太阳)和公众假期。

1 个答案:

答案 0 :(得分:0)

您可以在计算列中排除这样的周末:

=IF(AND((WEEKDAY(EndDate,2))<(WEEKDAY(StartDate,2)),((WEEKDAY(StartDate,2))-(WEEKDAY(EndDate,2)))>1),(((DATEDIF(StartDate,EndDate,"D")+1))-(FLOOR((DATEDIF(StartDate,EndDate,"D")+1)/7,1)*2)-2),(((DATEDIF(StartDate,EndDate,"D")+1))-(FLOOR((DATEDIF(StartDate,EndDate,"D")+1)/7,1)*2)))

我不知道公众假期如何:)