You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
DATETIMEFORMAT on a Date returns the previous day #246
Expected:September 9, 2026. Actual:September 8, 2026 — one day earlier.
The same shift appears on Date fields, not just DATE() literals: a field holding 2026-09-09
formats as September 8.
Running org's timezone is behind UTC, which is presumably the cause — the Date looks like it is
being widened to a DateTime at midnight UTC and then rendered in the local timezone, moving it back
a day. A Date has no time and no zone, so formatting one should never shift it.
TEXT() on the same value is correct, so the two functions disagree about what the date is.
Why it matters
Silent and plausible. A due date, an expiration date or an invoice date renders one day early and
nothing about the output looks wrong — you only catch it by comparing against the record. Any
formatted date in a customer-facing document is affected.
Environment
Expression 1.52.0.1, Developer Edition scratch org, org timezone behind UTC.
Activity