Dec 09, 2021 07:00 AM
I have an Automation to send an email when a record enters a view. I can get a regular date field to format the way I want, but I can’t when I try to do any calculations. This is a Deadline date that I would like to add 48 hours to from the time it enters the view.
Anyone have any suggestions on how to do this? I’ve tried multiple variations of the following. I’ve also tried using Update Record Automation, but it won’t accept DATEADD() or I’m not doing something correctly.
If it’s just a plain date field, I can use this and it works fine:
DATETIME_FORMAT(SET_TIMEZONE(
{Test Date}, ‘America/Los_Angeles’),‘dddd, MMMM D, YYYY h:mm a’)
But if I try adding 48 hours using something like this to an Intermediate Due Date:
DATEADD({Deadline},48,’hour’)
And change the formula to this:
DATETIME_FORMAT(SET_TIMEZONE(
DATEADD({Intermediate Due Date}, 48,’hour’), ‘America/Los_Angeles’),‘dddd, MMMM D, YYYY h:mm a’)
It fails and says the formula is invalid.
Even when it looks correct in the View,
What I end up with in the Automation Send email is this: 2021-12-10T07:48:53.000Z
not this: Saturday, December 11, 2021 6:45 am
Thanks for any help you can give me,
Tammy
Nov 11, 2022 03:06 PM
I have this same question! Does anyone have an answer?
Nov 11, 2022 03:20 PM
Unfortunately, for some reason, Airtable chose to make its automations always display times in that strange ISO 8601 format that shows the UTC time.
The 3 primary workarounds for this are:
You can write your own custom Javascript script in your automation to format the date & time correctly.
You can create a formula field in your database using the DATETIME_FORMAT
and SET_TIMEZONE
functions, and then use that formula field in your automation. (Formula field reference here.)
You can use an external automation tool like Make.com, which offers date formatting functions within its automations.