Converts a Unix epoch timestamp in seconds, milliseconds, or microseconds to a datetime in Universal Time Coordinated(UTC).

Sample Usage

EPOCHTODATE(A1,1)

EPOCHTODATE(1655908429662,2)

EPOCHTODATE(1655906710)

Syntax

EPOCHTODATE(timestamp, [unit])

  • Timestamp: A Unix epoch timestamp, in seconds, milliseconds, or microseconds.

  • Unit [OPTIONAL – 1 by default]: The unit of time in which the timestamp is expressed.

  • 1 indicates the time unit is seconds.

  • 2 indicates the time unit is milliseconds.

  • 3 indicates the time unit is microseconds.

Notes

  • Seconds is the default unit of time.
  • Fractional amounts of milliseconds are shortened.
  • The result will be in UTC, not the local time zone of your spreadsheet.
  • Negative timestamps aren’t accepted.
  • The result is computed by dividing the timestamp (converted to milliseconds) by the number of milliseconds in a day and adding 25,568. Learn more about dates in Sheets.

Examples

EPOCHTODATE general usage.

1TimestampResultFormula
216559065688936/22/2022 14:02:49=EPOCHTODATE(A2,2)
316559067106/22/2022 14:05:10=EPOCHTODATE(A3,1)
401/1/1970 0:00:00=EPOCHTODATE(A4,2)
515840338973/12/2020 17:24:57=EPOCHTODATE(A5)
616563566780004106/27/2022 19:04:38=EPOCHTODATE(A6,3)
  • DATE: Converts a year, month, and day into a date.
  • TIME: Converts an hour, minute, and second into a time.