Get Timestamp from SCN in Oracle 10g 11g? Convert SCN to Timestamp Using scn_to_timestamp and timestamp_to_scn

advertisements

_____________________________________________________________________________________________________________________

The Eucharistic Miracles of the World
There are 2 functions to perform these operations.
For converting SCN to Time Stamp you can use scn_to_timestamp function and for converting time stamp to SCN use timestamp_to_scn.
e.g:
SQL>  select scn_to_timestamp(11626841778000) from dual;

SCN_TO_TIMESTAMP(11626841778000)
---------------------------------------------------------------------------
29-AUG-11 08.42.54.000000000 PM

SQL> select timestamp_to_scn('29-AUG-11 08.42.54.000000000 PM') SCN from dual;

              SCN
-----------------
   11626841778000

_____________________________________________________________________________________________________________________

Website Stats

0 comments:

Post a Comment

Labels

Oracle (629) Script (86) General (77) Unix (47) Blog (23) Technology (19) gadget (6) games (6) Business (3) OCI (3) SQL* Loader (3) Datapump (2)
 

acehints.com Copyright 2011-23 All Rights Reserved | Site Map | Contact | Disclaimer