Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003
    Posts
    2

    Angry Unanswered: How to select a date value with milisecond?

    Hi all,

    I try to select from Oracle 9 a date value with milisecond but I fail.
    The sql command "select to_char(sysdate,'YYYY-MM-DD HH24:MIS.MS') from dual" is wasn't work.

    Do you have any idea on this?

    Lee

  2. #2
    Join Date
    Sep 2002
    Location
    UK
    Posts
    5,171
    Provided Answers: 1
    The Oracle DATE datatype doesn't do milliseconds - it's smallest value is a second.

    Use the newer TIMESTAMP datatype for sub-second precision (up to 9 decimal places) - and use SYSTIMESTAMP instead of SYSDATE.

    The format for milliseconds is '.FFF' not '.MS'

Posting Permissions

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