For Developers

Unix Timestamp in Google Sheets

How to convert a Unix timestamp to a readable date in Google Sheets, and back — it shares Excel's date system, with one small formula difference worth knowing.

=(NOW()-DATE(1970,1,1))*86400
=A1/86400+DATE(1970,1,1)
' then Format > Number > Date time
=(A1-DATE(1970,1,1))*86400

The Google Sheets-specific pitfall

Google Sheets uses the same serial-date system as Excel (days since December 30, 1899), so the conversion formulas are identical — but NOW() in Sheets recalculates using the timezone set in File > Settings, not the viewer's browser timezone or the spreadsheet owner's device. A formula that works correctly for one collaborator can be off by several hours for another simply because they're looking at the same spreadsheet with a different regional setting, or because the sheet's timezone was never explicitly set and defaulted to something unexpected. Check the spreadsheet's own timezone setting before trusting any live timestamp formula.

Have a timestamp right now?

Paste it into the Timestamp ⇄ Date Converter to check it instantly, in any timezone, without writing any code. Working across several languages on the same project? The full Epoch Time in Programming Languages guide has all of them side by side for quick comparison.

Related

Related tools & reading