Help

Re: DATETIME_FORMAT returning wrong time

1085 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Alba
4 - Data Explorer
4 - Data Explorer

Hi there,

I’m using Airtable to log some vitals for my doctor, and, for some reason, DATETIME_FORMAT is returning the wrong times. So, 1:17 becomes 7:17, for example. Here’s my formula:

DATETIME_FORMAT({Auto Date},"M/D/YY - h:m ") & {AM/PM}

Any suggestions would be appreciated! :slightly_smiling_face:

7 Replies 7

Hey @Alba,

welcome to Airtable community.

You have to update the specifier to have the result you are looking for. Please check the list of specifiers in the guide below:

Yours sincerely,
Dimitris Goudis

Alba
4 - Data Explorer
4 - Data Explorer

The provided format specifiers didn’t work, so my workaround was to create:

  1. Checkbox field called PM
  2. Formula field to check if the checkbox field is checked [IF({PM},“pm”,“am”)]
  3. Formula primary field that substitutes the insufficient or not working supported format specifiers with whatever’s in the second formula field [DATETIME_FORMAT({Auto Date},"M/D/YY - h:m ") & {AM/PM}]

That worked, but, my gosh…

Your formula doesn’t look correct to me, but are you in the central time zone? If so, your issue was probably the GMT time zone toggle in one or both of your fields.

Thanks for the suggestion. It just doesn’t work for me here. Whether GMT is toggled on or off, I’m still getting the wrong time returned.

Alba
4 - Data Explorer
4 - Data Explorer

Somehow, I’m back at square one here. Why can’t I just make the created time the primary field?

Use a formula field for your primary field, with the formula for the created time: CREATED_TIME().

That did it! That, along with toggling off the GMT thing in the primary field’s formatting tab. Thanks, kuovonne!