Dec 10, 2017 07:55 AM
I am looking for the correct formula for the following:
[Field] Time off End - [Field] Time off Start = [Field] number of days
i.e. 11/15/17 - 11/18/17 = 4
I realize the result of the calculation might be 3, since the 18th is not included, but I should be able to add + 1 to the formula to get the desired result.
I have tried various formula, but have not stumbled across the correct one.
Thanks for any advice on this topic.
Gordon Peery
Dec 10, 2017 11:31 AM
What you’re looking for is DATETIME_DIFF()
— in this case, DATETIME_DIFF(Date1,Date2,'days')
.
That ‘days’ could also be ‘d’ — or any one of 18 other possible unit specifiers.
Airtable has an impressively rich collection of date and time functions. Just the possibilities offered by DATETIME_PARSE()
(see here for more info) could keep you busy for days.
Dec 13, 2017 03:19 AM
Thank you. It’s working.