Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

scn_to_timestamp and timestamp_to_scn

640568Oct 9 2008 — edited Oct 9 2008
Hello,

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 6 2008
Added on Oct 9 2008
19 comments
10,451 views