Message Boards Message Boards

0
|
10220 Views
|
2 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Converting Unix seconds to date

Posted 10 years ago
POSTED BY: Chuck Petras
2 Replies

The Wolfram Language function AbsoluteTime counts the number of seconds from Jan 1, 1900, while UNIX time is the number of seconds from Jan 1,1970.

You can convert pretty easily with the following:

DateList[1409855505 + AbsoluteTime[{1970}]]

which returns your expected:

 {2014, 9, 4, 18, 31, 45.}
POSTED BY: Jesus Hernandez

I'm not sure if that's built-in but you could query for that using the actual definition of UNIX seconds:

http://www.wolframalpha.com/input/?i=1409855505+seconds+after+1+January+1970+UTC

POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract