Skip to main content
Participant
September 27, 2006
Question

Convert number of seconds since January 1, 1970 00:00:00 (epoch time) to a datetime format

  • September 27, 2006
  • 1 reply
  • 689 views


I have a code that should convert number of seconds since January 1, 1970 00:00:00 (epoch time) to
a datetime format. It uses something like the following:

DateAdd("s",mydateinsecs,CreateDateTime(1970,1,1))

The problem is if the date is in DST (daylight savings time), 1 extra hour will be added to the resulting time by DateAdd().

Does someone how to fix it?
    This topic has been closed for replies.

    1 reply

    Inspiring
    September 27, 2006
    VictorSotnikov wrote:
    > The problem is if the date is in DST (daylight savings time), 1 extra hour
    > will be added to the resulting time by DateAdd().


    http://www.sustainablegis.com/blog/cfg11n/index.cfm?mode=entry&entry=77223B6A-20ED-7DEE-2AB7FBB1F37ABD77