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
- Basic Conversion
Convert a Unix timestamp 1625616000
to a date:
=EPOCHTODATE(1625616000)
- 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.