ISO 8601 Date, Time, and Duration Support

International Standards Organization (ISO) standard 8601 describes an internationally accepted way to represent dates, times, and durations. Oracle Database supports the most common ISO 8601 formats as proper Oracle SQL date, time, and interval (duration) values. The formats that are supported are essentially those that are numeric-only, language-neutral, and unambiguous.

(Simple Oracle Document Access (SODA) does not support durations.)

Oracle Database Syntax for ISO Dates and Times

This is the syntax that Oracle Database supports for ISO dates and times:

where:

For a time value, the time-zone part is optional. If it is absent then UTC time is assumed.

No other ISO 8601 date-time syntax is supported. In particular:

Supported dates and times include the following:

Unsupported dates and times include the following:

Oracle Database Syntax for ISO Durations

Note: Oracle Database supports ISO durations, but Simple Oracle Document Access (SODA) does not support them.

There are two supported Oracle Database syntaxes for ISO durations, the ds_iso_format specified for SQL function to_dsinterval and the ym_iso_format specified for SQL function to_yminterval. (to_dsinterval returns an instance of SQL type INTERVAL DAY TO SECOND, and to_yminterval returns an instance of type INTERVAL YEAR TO MONTH.)

These formats are used for data types daysecondInterval and yearmonthInterval, respectively, which Oracle has added to the JSON language.

See Also:

Related Topics