Skip to content
Google Sheets

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.

  1. A Unix timestamp in seconds turned into a date-time (UTC) — 14 Aug 2026 00:00:

    =EPOCHTODATE(1786665600)

    Result2026-08-14 00:00:00

  2. A 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.

Loading the editor…

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.