Oracle Timestamp, Max, and Minimum Values

I also searched the following in Oracle Doc:

  • What is the range for timestamp in Oracle?

I know the date is -4712, January-January-December-December-31, but what is the timestamp?

Someone tell me or tell me where I can search?

+4
source share
2 answers

You can always try:

SQL> select to_timestamp( '9999-12-31 23:59:59', 'yyyy-mm-dd hh24:mi:ss' ) from dual; TO_TIMESTAMP('9999-12-3123:59:59','YYYY-MM-DDHH24:MI:SS') --------------------------------------------------------------------------- 31-DEC-99 11.59.59.000000000 PM 

and

 SQL> select to_timestamp( '9999-12-31 23:59:59', 'yyyy-mm-dd hh24:mi:ss' )+1 from dual; select to_timestamp( '9999-12-31 23:59:59', 'yyyy-mm-dd hh24:mi:ss' )+1 from dual * ERROR at line 1: ORA-01841: (full) year must be between -4713 and +9999, and not be 0 
+7
source

It would be surprising if the range for the DATE of TIMESTAMP was less than the range for DATE, so it should be:

 -4712-01-01 00:00:00 to 9999-12-31 23:59:59.999999 

This does not imply a time zone; the UTC value is probably limited to this range, but someone from the eastern time zone can see the data value in 1000-01-01 in his time zone.

It is difficult to find the final data from the Oracle site. The best I found in a random survey was:

Perhaps there are others.


I found a quote that says:

TIMESTAMP data type

The TIMESTAMP data type is an extension of the DATE data type. It stores the year, month, and day of the DATE data type, plus hour, minute, and second.

+2
source

Source: https://habr.com/ru/post/1402123/


All Articles