Skip to Main Content

SQL & PL/SQL

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!

adding milliseconds to a timestamp

384260Nov 11 2003 — edited Nov 11 2003
Is there a way to add a number of milliseconds to a timestamp and not loose fractional seconds?

select to_timestamp('01-jan-1970 00:00:00.000', 'dd-mon-yyyy hh24:mi:ss.ff') + 1068568161783/(24*60*60*1000) as gmt_time from dual;

Running the query above results in rounding to the nearest second. From the docs, I learned that oracle implicitly casts to date on arithmetic operations. So how can this be accomplished?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 9 2003
Added on Nov 11 2003
2 comments
5,351 views