Skip to main content

Date and time formula

  • September 22, 2023
  • 1 reply
  • 91 views

Forum|alt.badge.img+12
  • Known Participant

I am using a date and time field that shows in ET- i.e 9/22/2023 11:00am. It was showing up in a weird way in automations, so i followed a formula that i saw in a pervious post to format it -

DATETIME_FORMAT({Launch Date & Time},'M/D/YYYY \\at h:mma') - but then for some reason it's showing is as "9/22/2023 at 4:00pm". I obviously want it to show as "9/22/2023 at 11:00am"- What am i doing wrong?

1 reply

AirOps
Forum|alt.badge.img+10
  • Participating Frequently
  • September 25, 2023

Hi Limi! 

Th reason why you are seeing the time displayed in a different time zone has to do with how Airtable stores dates on their back end. All dates are in the UTC timezone, to rectify this you will need to add a function to first change the time zone of your date field to the appropriate time zone, and then switch the format. 

This function is SET_TIMEZONE, which you can read about here.

In the end your formula should look something like this: 

DATETIME_FORMAT(SET_TIMEZONE({Launch Date & Time},['timezone identifier'])'M/D/YYYY \\at h:mma')

I hope this helps! 

Chantal