Skip to main content
Solved

DATETIME_FORMAT is rounding up?

  • September 17, 2021
  • 2 replies
  • 25 views

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

Best answer by kuovonne

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.

2 replies

kuovonne
Forum|alt.badge.img+29
  • Brainy
  • Answer
  • September 17, 2021

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.


  • Author
  • New Participant
  • September 17, 2021

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!