Converting Excel Dates to UNIX Timestamps

A previous article showed how to convert a UNIX Timestamp to an Excel Date. It’s also possible to do the reverse- convert an Excel Date value to a UNIX formatted Timestamp.

Where cell A2 contains an Excel Date time this formula produces a UNIX timestamp.

1=(A2-DATE(1970,1,1))*86400 

In the example the Date cell (column A) is formatted with the custom format dd/mm/yy hh:mm:ss and the Timestamp cell (column B) is formatted as a Number to 0 decimal places.