SCN_TO_TIMESTAMP
Syntax
SCN_TO_TIMESTAMP(number)
Description
The SCN_TO_TIMESTAMP() function converts a specified SCN to a timestamp. The return value is of the DATETIME type.
Examples
SELECT MAX_SCN, SCN_TO_TIMESTAMP(MAX_SCN) FROM oceanbase.V$OB_LOG_STAT;
+---------------------+----------------------------+
| MAX_SCN | SCN_TO_TIMESTAMP(MAX_SCN) |
+---------------------+----------------------------+
| 1766126752210029000 | 2025-12-19 14:45:52.210029 |
+---------------------+----------------------------+
1 row in set (0.001 sec)
info
oceanbase.V$OB_LOG_STAT displays the log synchronization status of log streams. Its MAX_SCN field is an SCN, which you can convert to a timestamp by using SCN_TO_TIMESTAMP().