1

I am trying to create a calculated column which shows the number of days' difference between two columns which have dates in them. I understand that I can get this with the following formula:

=DATEDIF([Date 1],[Date 2],"D")

which indeed works, as long as there is a date in both columns.

I am looking for formula - if one of the date is blank, then it should use another column date to find difference

My Calculated column would be names as [daysvacant] Days between [PositionFilleddate] - [resigneddate]

if [Positionfilleddate] is blank, then I want [Today]-[resigneddate]

0

Use below formula:

=IF(ISBLANK([Positionfilleddate]), DATEDIF([resigneddate], Today(), "d"), DATEDIF([resigneddate], [Positionfilleddate], "d"))

References:

  1. Calculate the difference between two dates
1
  • Yes, Thanks. It worked – Raj Abba Apr 3 at 15:12
0

Yes, i did exactly the same, it worked

=IF(ISBLANK([Positionfilleddate]), DATEDIF([resigneddate], Today(), "d"), DATEDIF([resigneddate], [Positionfilleddate], "d"))

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.