Forum Discussion

ash052621's avatar
ash052621
Copper Contributor
Feb 28, 2022

Sharepoint count workdays with ISBLANK

Hi!

 

I'm new to the sharepoint platform and currently working on a project where it will count the number of days from "Start Date" to "End Date" excluding weekends and if the End date ISBLANK, it should calculate the date TODAY.

 

I hope someone can help and thanks in advance!

 

Cheers!

  • ash052621 to get you started the formula for the number of working days between the StartDate and EndDate columns is as follows:

    =(DATEDIF([StartDate],[EndDate],"D"))-INT(DATEDIF([StartDate],[EndDate],"D")/7)*2-IF(WEEKDAY([EndDate])<WEEKDAY([StartDate]),2, IF(OR(WEEKDAY([EndDate])=7,WEEKDAY([StartDate])=1),1,0))+1

     

     

    But I'd have to give more thought to the ISBLANK aspect of this, unless someone else has any thoughts.

     

    Rob
    Los Gallardos
    Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

     

  • RobElliott's avatar
    RobElliott
    Silver Contributor

    ash052621 to get you started the formula for the number of working days between the StartDate and EndDate columns is as follows:

    =(DATEDIF([StartDate],[EndDate],"D"))-INT(DATEDIF([StartDate],[EndDate],"D")/7)*2-IF(WEEKDAY([EndDate])<WEEKDAY([StartDate]),2, IF(OR(WEEKDAY([EndDate])=7,WEEKDAY([StartDate])=1),1,0))+1

     

     

    But I'd have to give more thought to the ISBLANK aspect of this, unless someone else has any thoughts.

     

    Rob
    Los Gallardos
    Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

     

Resources