<< Go back to all functions

EPOCHTODATE

The EPOCHTODATE function in Google Sheets is a useful tool for converting a Unix epoch timestamp in seconds, milliseconds, or microseconds to a datetime in UTC. With this function, you can easily work with timestamps and perform various calculations.

Function Syntax and Parameters

Syntax: EPOCHTODATE(timestamp, [unit])

Parameters:

  • timestamp: The Unix epoch timestamp to convert to a datetime.
  • unit [Optional]: The unit of the timestamp (seconds, milliseconds, or microseconds). If not specified, it is assumed to be in seconds.

Step-by-Step Tutorial

  1. Converting a timestamp to a datetime:

    • Example: =EPOCHTODATE(1599811200)
    • Result: 2020-09-11
  2. Converting a timestamp with a specified unit:

    • Example: =EPOCHTODATE(1599811200000, "milliseconds")
    • Result: 2020-09-11

Use Cases and Scenarios

  1. Data Analysis: Convert Unix epoch timestamps to datetimes for further analysis.
  2. Time Series Analysis: Work with timestamps in various time units.
  3. API Integration: Convert timestamps received from an API to a readable format.

Related Functions

  • DATE: Returns the date value in the specified format.
  • TIME: Returns the time value in the specified format.

Related Articles