Forum Discussion
thomascheung
Jan 19, 2023Copper Contributor
Calculated date difference excluded public holiday and weekend
Hi, everyone, i am trying to use calculated type column to calculate the date difference. =NETWORKDAYS(start date, end date, (List of public holiday)). The public dates are saved in sharepoint lis...
SvenSieverding
Jan 20, 2023Bronze Contributor
Hi thomascheung,
As ganeshsanap said: Not with a calculated column...
But you could create a number field "DaysBetween" column and create a PowerAutomate flow that
- Is triggered by item update
- Checks if the "DaysBetween" column is empty (to avoid an endless loop)
- Caclulates the date difference in days between StartDate and Enddate
- Queries how many public holidays are in your "Holiday list" between StartDate and Enddate
- Subtracts both values
- Updates the item and set the "DaysBetween" column to the caluclated value
Best Regards,
Sven
PGPrash
Sep 22, 2023Copper Contributor