Help

DATETIME_FORMAT is rounding up?

Topic Labels: Dates & Timezones
Solved
Jump to Solution
1255 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Brian_Gumm1
5 - Automation Enthusiast
5 - Automation Enthusiast

I have a formula field that takes 2 datetime fields and creates a “week overview” with them. But value of [Day] 11:59pm in the End Date field seems to round the day up to the next day, which is misleading.

Here’s the formula
IF(Start,IF(End,CONCATENATE(DATETIME_FORMAT(Start,"YYYY MM/DD")," - ",DATETIME_FORMAT(End,"MM/DD")," ",{Use Case}),"TBD"),"TBD")

Result
Screen Shot 2021-09-17 at 1.25.22 PM

1 Solution

Accepted Solutions
kuovonne
18 - Pluto
18 - Pluto

This is probably a time-zone issue.

DATETIME_FORMAT formats the GMT time, unless you use SET_TIMEZONE()

Date/time and formula fields with date/time values should also have the “use same timezone” set the same way across different fields. Having the switch turned off is usually best in most cases, but sometimes it needs to be turned on when mixing date/time values with date values.

See Solution in Thread

2 Replies 2
kuovonne
18 - Pluto
18 - Pluto

This is probably a time-zone issue.

DATETIME_FORMAT formats the GMT time, unless you use SET_TIMEZONE()

Date/time and formula fields with date/time values should also have the “use same timezone” set the same way across different fields. Having the switch turned off is usually best in most cases, but sometimes it needs to be turned on when mixing date/time values with date values.

Aaaah, right you are - Thank you, kuovonne!