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:

  • Y for “year” (non-padded)

  • MO for “month” (non-padded)

  • D for “day” (non-padded)

  • H24 for “24-hour based hour of the day” (non-padded)

  • H12 for “12-hour based hour of the day” (non-padded)

  • H as a synonym for H24

  • ME for “minute” (non-padded)

  • S for “second” (non-padded)

  • P for “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 example 2026-03-18 JST.

  • Now, the S in JST will 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:

-- Before (incorrect after this change):
SELECT TO_CHAR(current_timestamp(), 'YYYY-MM-DD JST');

-- After (corrected):
SELECT TO_CHAR(current_timestamp(), 'YYYY-MM-DD "JST"');

Ref: 2281