0

在 sharepoint 2010 计算列中计算开始时间和结束时间之间的天数时,如何排除周末(周六和周日)和公共假期。

4

1 回答 1

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)))

我不知道公共假期怎么样:)

于 2013-08-02T11:51:37.023 回答