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!

timestamp math

lakeNov 21 2013 — edited Nov 24 2013

I am trying to do math with timestamps (the type timestamp(2)) and it's driving me crazy.

For starters, what goes on here?

select systimestamp,systimestamp + 1 from dual;

21-NOV-13 01.38.22.145000 PM -06:00    11/22/2013 13:38:22

What did it do? systimestamp + 1 is the next day so I take it that it

interpretted 1 as one day but what happened to the sub seconds?

So is the result truncated to a date?

How do you do math with timestamps? it is definitely not acceptable to lose the subseconds.

Do people have to write their own functions to do timestamp math and none (non-lossy)  are provided?

This post has been answered by Frank Kulash on Nov 21 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 22 2013
Added on Nov 21 2013
9 comments
7,429 views