EPOCHTODATE Function in Google Sheets

Convert a Unix timestamp to a human-readable date format using the EPOCHTODATE function.

EPOCHTODATE Function

The EPOCHTODATE function in Google Sheets converts a Unix timestamp to a human-readable date.

Syntax

EPOCHTODATE(timestamp, \[unit\])
  • timestamp: The Unix timestamp to convert.
  • unit: (Optional) The unit of the timestamp. Use 0 for seconds, 1 for milliseconds. Default is 0.

Examples

  1. Basic Conversion

Convert a Unix timestamp 1625616000 to a date:

=EPOCHTODATE(1625616000)
  1. Conversion with Milliseconds

Convert a Unix timestamp in milliseconds 1625616000000:

=EPOCHTODATE(1625616000000, 1)

Notes

  • Useful for converting timestamps from APIs or databases.
  • Supports only timestamps after January 1, 1970.
  • DATE: Creates a date from year, month, and day.
  • NOW: Returns the current date and time.