- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 06, 2022 01:40 PM
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:
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 07, 2022 02:11 AM
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
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 09, 2022 02:43 PM
The provided format specifiers didn’t work, so my workaround was to create:
- Checkbox field called PM
- Formula field to check if the checkbox field is checked [IF({PM},“pm”,“am”)]
- 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…
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 09, 2022 04:03 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 09, 2022 04:41 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 09, 2022 05:03 PM
Somehow, I’m back at square one here. Why can’t I just make the created time the primary field?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 09, 2022 05:53 PM
Use a formula field for your primary field, with the formula for the created time: CREATED_TIME()
.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jan 12, 2022 05:36 PM
That did it! That, along with toggling off the GMT thing in the primary field’s formatting tab. Thanks, kuovonne!