EPOCHTODATE function in Google Sheets
Converts a Unix epoch timestamp in seconds, milliseconds, or microseconds to a datetime in UTC.
=EPOCHTODATE(timestamp, [unit])EPOCHTODATE syntax and parameters
Two arguments, one required.
- timestampnumberRequired
A Unix epoch timestamp, in seconds, milliseconds, or microseconds.
- unitnumberOptional
[OPTIONAL – 1 by default]: The unit of time in which the timestamp is expressed.
EPOCHTODATE examples
Formulas you'll actually reuse.
A Unix timestamp in seconds turned into a date-time (UTC) — 14 Aug 2026 00:00:
=EPOCHTODATE(1786665600)Result
2026-08-14 00:00:00A millisecond timestamp from an API export (unit 2 = milliseconds):
=EPOCHTODATE(B2, 2)
EPOCHTODATE in Excel
No direct equivalent — here's the way around.
Try EPOCHTODATE in the playground
Edit the example — nothing to install.
Preloaded with the EPOCHTODATE formula from Example 1 — change anything and watch it respond.
EPOCHTODATE errors
What they mean — and the fixes.
#VALUE!The unit isn't 1 (seconds), 2 (milliseconds) or 3 (microseconds), or the timestamp isn't a number.
Related functions
More ways Google Sheets gets this done.
- DATEConverts a provided year, month, and day into a date.DateExcel
- DATEDIFCalculates the number of days, months, or years between two dates.DateExcel
- DATEVALUEConverts a provided date string in a known format to a date value.DateExcel
- DAYReturns the day of the month that a specific date falls on, in numeric format.DateExcel
- DAYSReturns the number of days between two dates.DateExcel
- DAYS360Returns the difference between two days based on the 360 day year used in some financial interest calculations.DateExcel