문제

I have a calendar on SharePoint online that I'm trying to use to track the amount of leave time employees use. Currently I'm capturing the number of hours daily that the employees are using a field on the event, but I would like to calculate the number of workdays in each event so that I can find out the total number of hours used by a given person.

I already assume I'm going to need another field to capture this, but how would I perform the calculation?

도움이 되었습니까?

해결책

To calculate the number of workdays between two date, you could try the following formula, it will exculde weekends:

=(DATEDIF([Start Time],[End Time],"d"))+1-INT(DATEDIF([Start Time],[End Time],"d")/7)*2-IF((WEEKDAY([End Time])-WEEKDAY([Start Time]))<0,2,0)-IF(OR(AND(WEEKDAY([End Time])=7,WEEKDAY([Start Time])=7),AND(WEEKDAY([End Time])=1,WEEKDAY([Start Time])=1)),1,0)-IF(AND(WEEKDAY([Start Time])=1,(WEEKDAY([End Time])-WEEKDAY([Start Time]))>0),1,0)-IF(AND(NOT(WEEKDAY([Start Time])=7),WEEKDAY([End Time])=7),1,0)
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top