SQL Changes: Add new date and time format elements (Pending)¶
Attention
This behavior change is in the 2026_03 bundle.
For the current status of the bundle, refer to Bundle history.
When this behavior change bundle is enabled, new short-form date and time format elements are enabled, which affects datetime formatting and parsing logic.
- Before the change:
The following format elements were parsed and serialized as literal characters in datetime-to-string or string-to-datetime conversion:
Y,MO,D,H24,H12,H,ME,S,P.- After the change:
The following new format elements are now interpreted by the parsing and formatting logic:
Yfor “year” (non-padded)MOfor “month” (non-padded)Dfor “day” (non-padded)H24for “24-hour based hour of the day” (non-padded)H12for “12-hour based hour of the day” (non-padded)Has a synonym forH24MEfor “minute” (non-padded)Sfor “second” (non-padded)Pfor “single letter AM/PM indicator” (A for AM or P for PM)
Any unquoted usage of these characters or sequences will be interpreted as a format element instead of a literal.
This behavior change may constitute a breaking change for users who have used these new format elements as unquoted characters in their format models for DATE, TIME, TIMESTAMP_LTZ, TIMESTAMP_NTZ, or TIMESTAMP_TZ.
For example:
Previously,
SELECT TO_CHAR(current_timestamp(), 'YYYY-MM-DD JST')would output the sequence “JST” as literal characters, for example2026-03-18 JST.Now, the
SinJSTwill be interpreted as a “second” format element, and the formatting logic will insert a numerical value:2026-03-18 J47T.
What you need to do¶
If you use any of these new format elements as unquoted characters or strings in your format models, quote any parts of the format model that should be kept as literal characters. For example:
Ref: 2281