scn_to_timestamp and timestamp_to_scn
640568Oct 9 2008 — edited Oct 9 2008Hello,
I have such strange(?) behaviour in my database
SQL> select to_timestamp('09.10.2008','dd.mm.yyyy') from dual;
---------------------------------------------------------------------------
08/10/09 00:00:00,000000000
SQL> select timestamp_to_scn(to_timestamp('09.10.2008','dd.mm.yyyy')) from dual;
---------------------------------------------------------
612168
SQL> select scn_to_timestamp(612168) from dual;
---------------------------------------------------------------------------
08/10/08 16:19:02,000000000
I thought that since timestamp_to_scn returns an SCN for the given timestamp, scn_to_timestamp returns the same timestamp for that SCN, but it doesn't. Is it because there's no hour in the timestamp? When I enter a timestamp in 'dd.mm.yyyy hh24:mi:ss' format everything is as it should be.
Regards,
Olimpia