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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert UNIX Timestamp to Access date and time

Status
Not open for further replies.

msf11

Technical User
Apr 10, 2003
15
0
0
US
I am importing a file into a microsoft access database that includes a unix timestamp which is in UTC (for example: 1066038603 = 10/13/2003 09:50). How can i convert this number into a date and time that can be recognized by microsoft access. Is there an access function that can convert this date?

Thanks for the help!
 
Unix stores it's time as the number of seconds since 01/01/1970 00:00, so to convert it, you can use the following expression

CurrTime = Format(DateAdd("s", 1066038603, "01/01/1970"), "mm/dd/yyyy hh:mm")

Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top