Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

DATETIME_DIFF if second date is blank

Topic Labels: Formulas
Solved
Jump to Solution
300 1
cancel
Showing results for 
Search instead for 
Did you mean: 

Hey everyone. I’m using this formula to calculate how many days it took for a response.

DATETIME_DIFF({Response date},({Submission date}), ‘days’) & " days"

I’d like to add a part to the logic that says if {Response date} is blank, calculate days between Submission date and today’s date.

Any ideas?

1 Solution

Accepted Solutions

For formulas like this, I like to use a multi-line format

DATETIME_DIFF(
  IF({Response date}, {Response date}, TODAY()),
  {Submission date}, 
  'days'
) 
& " days"

See Solution in Thread

1 Reply 1

For formulas like this, I like to use a multi-line format

DATETIME_DIFF(
  IF({Response date}, {Response date}, TODAY()),
  {Submission date}, 
  'days'
) 
& " days"