Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2003
    Reston, VA

    Cool Unanswered: Timestamp returned in Epoch Milliseconds

    Hello all...

    Quick question. I've done a bit of reading and know that the newer versions of Oracle have millisecond accuracy with the timestamp and sysdate functions. My questions can I return this as an Epoch value? For instance, I run a Stored Procedure that gives me millisecond accuracy....2/20/2005 17:45:45. Fantastic. do I turn this into a value such as 1108962494094? For those Java programmers out there....I'm trying to use the java.sql.Date(long l) constructor and setTime(long l) methods.

    Thoughts? I googled like crazy, but couldn't find anything good.

    Many thanks in advance!

  2. #2
    Join Date
    Aug 2003
    Where the Surf Meets the Turf @Del Mar, CA
    Provided Answers: 1
    EPOCH time started at 00:00 GMT 1-Jan-1970 & counts in 1 second increments.

    It appears you need some basic Google training, basic arithmetic training.

    Start with an Oracle Date/time value greater than the Epoch base above.
    Calculate the number of days between Epoch & Oracle's date = num_days.
    Num_days*(24*60*60) = num_seconds
    Num_seconds + seconds since midnight today = epoch value for Oracle's date/time.
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

Posting Permissions

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