How can I use the EPOCHTODATE function in Google Sheets?

How can I use the EPOCHTODATE function in Google Sheets?

The EPOCHTODATE function in Google Sheets allows users to convert a given epoch time (number of seconds since January 1, 1970) into a standard date format. This function is useful for data analysis or when working with data that is recorded in epoch time. By simply inputting the epoch time into the function, users can easily display the corresponding date in a familiar format. This function can greatly streamline the process of converting time data, saving users time and effort.

EPOCHTODATE function

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.

 

 

A

B

C

1

Timestamp

Result

Formula

2

1655906568893

6/22/2022 14:02:49

=EPOCHTODATE(A2,2)

3

1655906710

6/22/2022 14:05:10

=EPOCHTODATE(A3,1)

4

0

1/1/1970 0:00:00

=EPOCHTODATE(A4,2)

5

1584033897

3/12/2020 17:24:57

=EPOCHTODATE(A5)

6

1656356678000410

6/27/2022 19:04:38

=EPOCHTODATE(A6,3)

Related functions

  • DATE: Converts a year, month, and day into a date.
  • TIME: Converts an hour, minute, and second into a time.

Cite this article

stats writer (2024). How can I use the EPOCHTODATE function in Google Sheets?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-use-the-epochtodate-function-in-google-sheets/

stats writer. "How can I use the EPOCHTODATE function in Google Sheets?." PSYCHOLOGICAL SCALES, 28 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-i-use-the-epochtodate-function-in-google-sheets/.

stats writer. "How can I use the EPOCHTODATE function in Google Sheets?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-use-the-epochtodate-function-in-google-sheets/.

stats writer (2024) 'How can I use the EPOCHTODATE function in Google Sheets?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-use-the-epochtodate-function-in-google-sheets/.

[1] stats writer, "How can I use the EPOCHTODATE function in Google Sheets?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.

stats writer. How can I use the EPOCHTODATE function in Google Sheets?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.

Download Post (.PDF)
Slide Up
x
PDF
Scroll to Top