DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4

Thread: Percent Second Value

  1. #1

    Red face

    How could I display the percent second value of sysdate in Oracle? Or any other way to get this value? I want to get the date format of YYYY.MM.DD-HH24:MI:SS.ss
    Queyon Zeng

  2. #2
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    The lowest granularity in Oracle's DATE tadatype is 1 second, so you (at least presently,maybe 9i will change this) can only get your date up to the second. You can get some arbitrary number of hundredths of seconds by querying the view V$TIMER, but you can not directly connect this time to a date datatype, as seconds in date and hundreds of seconds in V$TIMER are not synchronized.

    But with use of java or external procedures you can easily create the function that returns a timestamp with the granularity of OS timestamp, which is typicaly much lower.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  3. #3

    Smile Thanks a lot

    Thank you very much.
    V$TIMER is exactly what I need.
    Queyon Zeng

  4. #4
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    BTW, SYS.DBMS_UTILITY.GET_TIME will return you the same information as the query from V$TIMER.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width