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!

Oracle 8i and sub-second time stamps

109942Jan 18 2002
Hi!

I wonder if anyone can tell me how to retrieve (and store) sub-second times in Oracle 8i (8.1.7.2.1).

I know there is a V$TIMER view which provides time in centi-seconds, but that is mainly for use in timing how long an operation or a set of operations take, and that is NOT what I want. Besides, the values returned by it are from an arbitrary epoch, so are completely useless for casting via some operation into an offset from the current second (or at least that's what I think)

I basically want to get values like "17-JAN-2001 13:24:03.69" where the last bit is the time now in milli-, centi- or micro-seconds.

I have hunted through the Oracle manuals, but can find no way to do the above. Seems Oracle does not provide any mechanism to do this, and it's DATE data-type is also restricted to storing time values down to the granularity of a second only!

I suppose if there IS some way to get sub-second time-stamps in Oracle, I will have to store them in VARCHAR2, or store the sub-second component seperately in a NUMBER, but how to get the sub-second values needs an answer first....

Any ideas?

Cheers,

Mohit.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 20 2002
Added on Jan 18 2002
3 comments
148 views