WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Time - Timer and Date Functions
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to Get Seconds Ticks since 1970

Keywords:     TimeDiffSecs

Question:

If a date is given in number of seconds ticked since 1970, is there a function that converts the date to standard time in year, month day format?

Answer:

Here is some sample code. Note that it cannot go past 68 years from 1970 (2038):

seconds=TimeDiffSecs(TimeYmdHms(),"1970:01:01:00:00:00")
Message("Seconds from Jan 01, 1970",seconds)


now=TimeAdd("1970:01:01:00:00:00","00:00:00:00:00:%seconds%")
Message(seconds,now)

Article ID:   W13872
Filename:   How to Get Seconds Ticks Since 1970.txt
File Created: 2000:12:26:14:02:32
Last Updated: 2000:12:26:14:02:32