Jan 28, 2018 03:38 PM
When my Birthday field is empty, how do I get Age to show nothing as opposed to “#ERROR”? Here is my formula at this point:
DATETIME_DIFF(TODAY(), {Birthday}, ‘years’)
Thanks for any help given.
May 18, 2019 08:15 AM
This is a great tip, although I’m still not quite able to do what I want.
WORKDAY({Icon Start}, 3)
is my formula for adding 3 work days to the date in Icon Start. This returns an error if the Icon Start date is null, which it often is.
So I wrapped it in an IF as mentioned above:
IF({Icon Start},WORKDAY({Icon Start}, 3),0)
But now, the result of WORKDAY({Icon Start}, 3)
is no longer a date that can be formatted, but rather a string, showing: May 20, 2019 2019-05-23T00:00:00.000Z
Is there a way to hide the #ERROR but also return a formatted date in the cell?
Thanks!
May 18, 2019 08:32 AM
Hi
All you need to do is to remove the ‘, 0’ from the IF - with 0 as one of the possible returned values, Airtable cannot interpret the result of the formula as definitely a date and so displays is as a text field. You will also find you will be able to use the format option on the result.
Hope this helps,
Julian
May 18, 2019 08:35 AM
Brilliant, thanks! That worked great.
Jun 21, 2019 09:06 AM
I don’t normally write code of any kind but can sometimes manage a cut-n-paste approach. Thanks to this thread, and with experimenting, I managed to create this formula for my time sheet (after months of putting in fake times). Thanks for the help!
IF({Start},DATETIME_DIFF(End, Start))+IF({Start 2},DATETIME_DIFF({End 2},{Start 2}))+IF({End 3},DATETIME_DIFF({End 3},{Start 3}))
The time sheet allows for coming and going up to three times during the day.