Forum Discussion

jcambareri's avatar
jcambareri
Copper Contributor
Jan 13, 2020

Calculated column not returning the correct number of days between two dates

I have a SharePoint Calendar that I'm using to track employee vacation time. One of the columns that I have is a calculated column which counts the number of workdays between the start & end date. 

 

The formula I'm using is:

=(DATEDIF([Start Date],[End Time],"D"))-INT(DATEDIF([Start Date],[End Time],"D")/7)*2-IF((WEEKDAY([End Time])-WEEKDAY([Start Date]))<0,2,0)

 

When I add a new event using the calendar form the formula works fine and correctly calculates the number of days off. However, when I add time to the calendar using my PowerApp the time is always short by 1 day.

 

I thought this might have to do with the site timezone or workweek settings but everything appears to be fine. The workweek is set to Monday - Friday and the region is EST.

 

Has anyone ever ran into a similar issue? Any thoughts on how this might be corrected?

No RepliesBe the first to reply