Skip to main content

IF no date leave blank field

  • April 29, 2020
  • 5 replies
  • 67 views

I used the DATETIME_DIFF({Date Due}, TODAY(), ‘days’) formula to give me the number of days until the due date, however, how do I put an IF statement in if there isn’t a start / due date?

5 replies

Forum|alt.badge.img+19
  • Inspiring
  • April 29, 2020

Hey Something like this should work. Your return values are seperated by commas. Your first value is your original formula, and your second is the value you want if there isn’t a date.

IF({Due Date}, DATETIME_DIFF({Date Due}, TODAY(), ‘days’), "**IF THERE ISN'T***")

  • Author
  • New Participant
  • April 29, 2020

Hey Something like this should work. Your return values are seperated by commas. Your first value is your original formula, and your second is the value you want if there isn’t a date.

IF({Due Date}, DATETIME_DIFF({Date Due}, TODAY(), ‘days’), "**IF THERE ISN'T***")

Thank you, but that didn’t work. Says there’s an error in the formula.


Mohamed_Swella1
Forum|alt.badge.img+17

Thank you, but that didn’t work. Says there’s an error in the formula.


You have to change the quotation marks in 'days'

So it should be

IF({Due Date}, DATETIME_DIFF({Date Due}, TODAY(), 'days'), Blank())

Forum|alt.badge.img+5
  • Participating Frequently
  • December 7, 2020

You have to change the quotation marks in 'days'

So it should be

IF({Due Date}, DATETIME_DIFF({Date Due}, TODAY(), 'days'), Blank())

Thankyou so much for this! Helped me too. Wondering if you can help me further - the formula is calculating the right number, except it’s returning a minus in front of the number for some reason. Any ideas how I can fix this?

IF({DOB}, DATETIME_DIFF({DOB}, TODAY(), ‘years’), BLANK())


Forum|alt.badge.img+1
  • New Participant
  • October 9, 2024

You have to change the quotation marks in 'days'

So it should be

IF({Due Date}, DATETIME_DIFF({Date Due}, TODAY(), 'days'), Blank())

I have a similar question...

I want a reminder field to calculate 30 days before a contract is going to expire. But sometimes, there is no "due date". In those instances, the "reminder" field should be blank. Currently it says #ERROR.

How can I change this reminder field formula?