Results 1 to 3 of 3

Thread: Time_T

  1. #1
    Join Date
    Oct 2002
    Location
    BC Canada
    Posts
    61

    Unanswered: Time_T

    Does anyone have a way of converting a windows date / time to a unix Time_t date?

    Thanks in advance...

  2. #2
    Join Date
    Feb 2002
    Location
    Houston, TX
    Posts
    809
    I belive that Time_t represents the seconds since the epoch data, for unix 1-Jan-1970 00:00:00, so to convert use ...

    select datediff(ss,'1-Jan-1970',<your date>)

    select datediff(ss,'1-Jan-1970',getdate()) gives 1041601388.

    What I don't know is how unix represents '12-Dec-1969 23:59:59'!
    Paul Young
    (Knowledge is power! Get some!)

  3. #3
    Join Date
    Oct 2002
    Location
    BC Canada
    Posts
    61
    Thanks,

    that did it.

Posting Permissions

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