Forum Discussion

Rickytruco's avatar
Rickytruco
Brass Contributor
Mar 25, 2024
Solved

Sharepoint list calculated column difference between dates (no weekends)

=DATEDIF([Fecha de inicio], IF(ISBLANK([Fecha cierre]), TODAY(), [Fecha cierre]), "D") + 1 - (INT(DATEDIF([Fecha de inicio], IF(ISBLANK([Fecha cierre]), TODAY(), [Fecha cierre]), "D") / 7) * 2) - IF...
  • Rob_Elliott's avatar
    Mar 25, 2024

    Rickytruco the formula I use for calculating working days is as follows:

    =IF(ISERROR(DATEDIF(Start,End,"d")),"",(DATEDIF(Start,End,"d"))+1-INT(DATEDIF(Start,End,"d")/7)*2-IF((WEEKDAY(End)-WEEKDAY(Start))<0,2,0)-IF(OR(AND(WEEKDAY(End)=7,WEEKDAY(Start)=7),AND(WEEKDAY(End)=1,WEEKDAY(Start)=1)),1,0)-IF(AND(WEEKDAY(Start)=1,(WEEKDAY(End)-WEEKDAY(Start))>0),1,0)-IF(AND(NOT(WEEKDAY(Start)=7),WEEKDAY(End)=7),1,0))

     

     

     

    Rob
    Los Gallardos
    Microsoft Power Automate Community Super User.
    Principal Consultant, SharePoint and Power Platform WSP Global (and classic 1967 Morris Traveller driver)

Resources