Re: Microseconds in Oracle

From: Thomas J. Kyte <tkyte_at_us.oracle.com>
Date: 1996/06/15
Message-ID: <31c31637.6159797_at_dcsun4>#1/1


On 14 Jun 1996 17:12:47 GMT, marc.baime_at_telops.gte.com (Marc Baime) wrote:

>Currently in Oracle you can get a timestamp down to the HHMMSS (seconds)
>level. Does anyone know if Oracle plans to implement microseconds or, as
>an alternative, can someone suggest a good way to implement a timestamp
>with one more level of detail (i.e. a microseconds equivalent). If
>Oracle is planning to implement it, I'd appreciate hearing about the
>time frame(no pun intended). Replies to marc.baime_at_telops.gte.com
>
>Thanks...Marc Baime
>

You can't save it in the date datatype but you can get it from one of two places.

dbms_utililty.get_time will reutrn the hundreds of seconds from some arbitrary point in time. If you mod by 100, you get hundreds of seconds within the current second.

Another easy way to get it is to select it as follows:

SQL> select to_char(sysdate,'dd-mon-yyyy hh24:mi:ss:' ) || mod(hsecs,100)   2 from v$timer;  

TO_CHAR(SYSDATE,'DD-MON-YYYYHH24:MI:SS:')||MOD(HSECS,100)



15-jun-1996 15:58:38:77  

SQL> Thomas Kyte
Oracle Government
tkyte_at_us.oracle.com                          

http://govt.us.oracle.com -- Check out our web site! Brand new, uses Oracle Web Server and Database


statements and opinions are mine and do not necessarily reflect the opinions of Oracle Corporation Received on Sat Jun 15 1996 - 00:00:00 CEST

Original text of this message