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

SUM formula not populating correcly

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

We have two columns that we need added to a third sum column. Our first column is our Admit Date for people using our program and the second is Exit Date for when they leave the program. We need our Admit Date and Exit Date columns to populate to a total days in care. Right now we have the formula as: SUM({Exit Date}-{Admit Date}) but it is giving us a message of NaN when an admit and exit date are plugged in.

1 Solution

Accepted Solutions

NaN stands for ‘not a number.’ SUM only operates on numbers - it won’t work with a date. You might say it has no concept of time :winking_face: The date functions are listed here.

Haven’t tested it yet, but I think your formula will be:

DATETIME_DIFF({Admit Date}, {Exit Date}, 'days')

See Solution in Thread

2 Replies 2

NaN stands for ‘not a number.’ SUM only operates on numbers - it won’t work with a date. You might say it has no concept of time :winking_face: The date functions are listed here.

Haven’t tested it yet, but I think your formula will be:

DATETIME_DIFF({Admit Date}, {Exit Date}, 'days')

Thank you! It was exit date first, but otherwise perfect!