Purpose
SCN_TO_TIMESTAMP() returns the timestamp associated with a system change number (SCN), which is the input argument of this function. The return value belongs to the TIMESTAMP type.
Syntax
SCN_TO_TIMESTAMP(number)
Examples
obclient> SELECT MAX_SCN, SCN_TO_TIMESTAMP(MAX_SCN) FROM gv$ob_log_stat;
+---------------------+---------------------------------+
| MAX_SCN | SCN_TO_TIMESTAMP(MAX_SCN) |
+---------------------+---------------------------------+
| 1676966094432030402 | 21-FEB-23 03.54.54.432030402 PM |
| 1676966094299077583 | 21-FEB-23 03.54.54.299077583 PM |
+---------------------+---------------------------------+
2 rows in set
Note
gv$ob_log_stat is an internal table that displays the synchronization status of log streams. The max_scn field in the table is of the SCN type. You can call the SCN_TO_TIMESTAMP() function to convert the SCN to a timestamp.