Skip to main content
Solved

DATETIME_FORMAT is rounding up?

  • Sep 17, 2021 6:29 PM UTC
  • 2 replies
  • 77 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.

View original
This topic has been closed for replies.

2 replies

kuovonne
Forum|alt.badge.img+29
  • Brainy
  • Answer
  • Sep 17, 2021 7:12 PM UTC

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
  • Sep 17, 2021 7:42 PM UTC

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!