Forum Discussion

Kidbaybut's avatar
Kidbaybut
Copper Contributor
Sep 18, 2023

Sla countdown in SP using todays date minus expected date.

Hi All

I'm struggling to find a formula that uses today's date minus an expected date in Sharepoint to provide a total number of days either to the expected date or post the expected date.

 

I have a formula to show the business days to the expected date but can't figure out how to include the negative values as well.

 

The formula I'm using is:

 

=(DATEDIF(TODAY(),[Expected Date],"D"))-INT(DATEDIF(TODAY(),[Expected Date],"D")/7)+2-IF(WEEKDAY([Expected Date])<WEEKDAY(TODAY()),2,IF(OR(WEEKDAY([Expected Date])=7, WEEKDAY(TODAY())=1),1,0))+1

 

Is it possible to get it to show negative values as well for example if the expected date was 13th sep and today was 15th sep the sla countdown would be - 2

 

Thanks

Kidbaybut

 

 

  • LeonPavesic's avatar
    LeonPavesic
    Silver Contributor

    Hi Kidbaybut,

    to try calculate the SLA countdown in SharePoint using today's date minus the expected date, including negative values when the expected date is in the past, you can use the following formula:


    =IF([Expected Date] >= TODAY(), [Expected Date] - TODAY(), -(TODAY() - [Expected Date]))

    This formula should give you the number of days left (positive) if the expected date is in the future or today, and it should show how many days overdue (negative) you are if the expected date is in the past.


    Please click Mark as Best Response & Like if my post helped you to solve your issue.
    This will help others to find the correct solution easily. It also closes the item.


    If the post was useful in other ways, please consider giving it Like.


    Kindest regards,


    Leon Pavesic

Resources