Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unix timestamp conversion 1

Status
Not open for further replies.

Motor11

Technical User
Jul 30, 2002
60
US
Hi Folks,

Unix sytems often timestamp data with a unique timestamp.

This time is typically defined as the number of seconds since Jan 1, 1970. Has anyone come across a formula to convert this "Unix time" to a more meaningful time (ie: a date and time that I can read)? Is this problem more trivial than I am making it out to be?

Thanks in advance,
Ryan
 
Try this:

msgbox Dateadd("s", myUnixNumber, "Jan 1 1970")
________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Thank you Johnwm,

Somehow I had managed to convince myself that this was going to be a difficult funtion to write (with daylight-savings and leap-years and such). Your helpful (and elegant) solution is perfect for my needs. And it's one line of code!!

Regards,
Ryan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top