Forum Discussion

analysta's avatar
analysta
Copper Contributor
Feb 23, 2023

SharePoint Calculated Column Blanks & Negative numbers

Hello - I have a calculated column that calculates the amount of days until the due date. My formula is: =DATEDIF(TODAY(),[Contract Expiration Date],"D") How can I revise this formula so I don't ge...
  • analysta's avatar
    Mar 07, 2023
    I figured out the correct formula. Here it is in case anyone else needs it.

    =IF(ISBLANK([Contract Expiration Date]),"",IF(ISERROR(DATEDIF(TODAY(),[Contract Expiration Date],"d")),-DATEDIF([Contract Expiration Date],TODAY(),"d"),DATEDIF(TODAY(),[Contract Expiration Date],"d")))

Resources