UNIX Epoch time
I have found a thread on here for converting TO epoch time. But how do I go about converting FROM epoch time? I don't see any functions in numbers that are very helpful.
2.4GHz MacBook Pro 15" and iMac G5, Mac OS X (10.5.4)
You can make a difference in the Apple Support Community!
When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.
When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.
I have found a thread on here for converting TO epoch time. But how do I go about converting FROM epoch time? I don't see any functions in numbers that are very helpful.
2.4GHz MacBook Pro 15" and iMac G5, Mac OS X (10.5.4)
Hi Michael,
Unix Epoch time is defined as the number of seconds since midnight at the start of January 1, 1970.
Conversion to a 'standard date and time' is simply a matter of adding the UNIX Epoch time, as a Duration of that many seconds, to January 1, 1970 00:00:00. Here's an example, followed by the formula(s).
B2: =NOW() (Formatted as Date and Time, Date: Jan 5, 2009, Time: 19:08:09)
C2: =DUR2SECONDS(B2-DATE(1970,1,1)) (This is Jerry's formula for conversion TO Epoch time, as given in Convert date/time to Unix epoch)
D2: =DATE(1970,1,1)+DURATION(,,,,C2) (The leading commas in the arguments for DURATION are necessary to establish that the value in C2 is read as a number of seconds. The easiest way to construct this function is to insert it from the Function Browser, place the cell reference to C2 in the 'seconds' location, then delete all of the other placeholder units, leaving the commas in place. The comma following the seocnds place may be deleted.)
Regards,
Barry
Hi Michael,
Unix Epoch time is defined as the number of seconds since midnight at the start of January 1, 1970.
Conversion to a 'standard date and time' is simply a matter of adding the UNIX Epoch time, as a Duration of that many seconds, to January 1, 1970 00:00:00. Here's an example, followed by the formula(s).
B2: =NOW() (Formatted as Date and Time, Date: Jan 5, 2009, Time: 19:08:09)
C2: =DUR2SECONDS(B2-DATE(1970,1,1)) (This is Jerry's formula for conversion TO Epoch time, as given in Convert date/time to Unix epoch)
D2: =DATE(1970,1,1)+DURATION(,,,,C2) (The leading commas in the arguments for DURATION are necessary to establish that the value in C2 is read as a number of seconds. The easiest way to construct this function is to insert it from the Function Browser, place the cell reference to C2 in the 'seconds' location, then delete all of the other placeholder units, leaving the commas in place. The comma following the seocnds place may be deleted.)
Regards,
Barry
UNIX Epoch time