An incorrect date or time is displayed in the calculation result of a DATE_FORMAT function
If the date or time in the calculation result of a DATE_FORMAT function is displayed incorrectly, it is possible that the time zone is not correctly specified.
The time zone of "Date" and "Time" fields is fixed at Coordinated Universal Time. If you use a "Date" or "Time" field in a formula, specify the time zone as "Etc/GMT" (the time zone ID for Coordinated Universal Time). If you specify other time zones, the calculation results will not be as expected.
For example, if you set "Osaka, Sapporo, Tokyo (Asia/Tokyo)" as the time zone, the time shown would be +9 hours.
- Example of a formula with an incorrectly specified time zone:
DATE_FORMAT(Field A, "HH:mm", "Asia/Tokyo")
If the value in Field A is "9:00", the calculation result will be "18:00".
If you specify the time zone as "Etc/GMT" (the time zone ID for Coordinated Universal Time), the correct time will be displayed.
- Example of a formula with a correctly specified time zone:
DATE_FORMAT(Field A, "HH:mm", "Etc/GMT")
If the value in Field A is "9:00", the calculation result will be "09:00".