Oct 02, 2023 07:34 AM
Hi, I'm feeling a little stupid in this moment, because I know that I'm doing a little mistake🤣 but I can't find it!
I need to print the actual hour, so if now it is 10:31 am, I need that the result is 10. I'm trying to use DATETIME_FORMAT and SET_TIMEZONE.. but it gives me error.
do you know how can I solve this problem?
Solved! Go to Solution.
Oct 02, 2023 07:56 AM
Hmmmm i guess that depend on your account time zone
To avoid the issue, try this :
DATETIME_FORMAT(SET_TIMEZONE(NOW(), 'America/New_York'), 'H')
Oct 02, 2023 07:48 AM
Here's how you can format the current time to display just the hour in Airtable:
DATETIME_FORMAT(NOW(), 'h')
This formula will return the current hour in a 12-hour clock format. If you want it in a 24-hour clock format, you can use 'H' instead of 'h':
DATETIME_FORMAT(NOW(), 'H')
Oct 02, 2023 07:51 AM
Hi, thank you for your help, I tried this, but it gave me the wrong time.. but at the moment is 10:50 am
For this reason, I thought about set a time zone
Oct 02, 2023 07:56 AM
Hmmmm i guess that depend on your account time zone
To avoid the issue, try this :
DATETIME_FORMAT(SET_TIMEZONE(NOW(), 'America/New_York'), 'H')
Oct 02, 2023 07:58 AM - edited Oct 02, 2023 07:58 AM
It works now! Thank you very much!