Forum Discussion
analysta
Feb 23, 2023Copper Contributor
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...
- Mar 07, 2023I 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")))
ganeshsanap
MVP
ej24-9 Try using formula like:
=IF(ISBLANK([Due Date]),"",DATEDIF([Another Date Column],[Due Date],"d"))
Make sure to use the correct display names of your date columns in the SharePoint list.
Please consider giving Like if my post helped you in any way.
ej24-9
Aug 15, 2023Copper Contributor
Thank you! This has helped but I am still getting #NUM! for dates beyond the Due Date i.e. negative results
- ganeshsanapAug 16, 2023MVP
ej24-9 Try using this:
=IF(ISBLANK([Due Date]),"",IF([Another Date Column]>[Due Date], -1 * DATEDIF([Due Date],[Another Date Column],"d"),DATEDIF([Another Date Column],[Due Date],"d")))
Please consider giving a Like if my post helped you in any way.