Help

Re: Need help formatting a date in a Automation

1109 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Tammy_Wilson
4 - Data Explorer
4 - Data Explorer

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

2 Replies 2
Cassie_Hayes2
4 - Data Explorer
4 - Data Explorer

I have this same question! Does anyone have an answer?

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:

  1. You can write your own custom Javascript script in your automation to format the date & time correctly.

  2. 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.)

  3. You can use an external automation tool like Make.com, which offers date formatting functions within its automations.