Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Dec 20, 2022 11:09 AM
It's currently 19:55 on the 21st december in New Zealand. Why does this calculation return a date of the 20th december and the time as 18:55? Surely it can't be that hard to show the correct date for the country you're in?
Dec 20, 2022 11:40 AM
Dates and times in formula fields are GMT time, unless you specify otherwise.
SET_TIMEZONE() by itself does not work unless you nest it inside DATETIME_FORMAT(), MONTH(), YEAR(), etc.
Instead, use NOW() by itself and set the format options for the formula to specify the “local time”. Not that the time is still likely to be off because NOW() does not update continuously. At best, it updates every 5 minutes or so, but it can also be several hours off.
Dec 21, 2022 02:27 PM
Thanks Kuovonne. NOW() would have been the first thing I tried. It doesn't work as it always includes a time and I'm needing to compare dates without the time. My imported dates all have 00:00:00 for time so when comparing them with NOW() or TODAY(), the calculation must first convert the date to the correct timezone and then replace the time with zeros. Hence the following calc :