Skip to main content

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?

 

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')

 


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')

 


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

 


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')

 


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')

 


It works now! Thank you very much!


Reply