How to convert long/milliseconds to DateTime?

Discussion in 'Ruby' started by Mike Nospam, Oct 24, 2006.

  1. Mike Nospam

    Mike Nospam Guest

    Hi,

    Java developer making the switch. I have timestamps stored in Oracle as
    a long (gotten from java.sql.Timestamp - milliseconds from some day in
    1970). Is there a way to convert that long back into a Ruby
    Date/DateTime/Time . Any of these would do.

    Did not find a method in the library...

    Thanks,

    Mike

    --
    Posted via http://www.ruby-forum.com/.
     
    Mike Nospam, Oct 24, 2006
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. George Marsaglia

    Assigning unsigned long to unsigned long long

    George Marsaglia, Jul 8, 2003, in forum: C Programming
    Replies:
    1
    Views:
    982
    Eric Sosman
    Jul 8, 2003
  2. Christos TZOTZIOY Georgiou
    Replies:
    3
    Views:
    1,049
    Christos TZOTZIOY Georgiou
    Sep 13, 2003
  3. Troy
    Replies:
    1
    Views:
    585
    M.-A. Lemburg
    Feb 28, 2004
  4. mp
    Replies:
    1
    Views:
    680
    John Machin
    Jul 28, 2006
  5. Martin
    Replies:
    0
    Views:
    646
    Martin
    Dec 27, 2008
  6. Replies:
    2
    Views:
    1,063
    M.-A. Lemburg
    Jan 6, 2009
  7. NiklasRTZ

    datetime.datetime. or datetime. ?

    NiklasRTZ, Oct 8, 2009, in forum: Python
    Replies:
    10
    Views:
    761
    niklasr
    Oct 11, 2009
  8. Justin Voelker
    Replies:
    2
    Views:
    481
    Dr J R Stockton
    Dec 2, 2008
Loading...