Unix Timestamp to Date and Time – Epoch Converter

Content last reviewed:

Paste a Unix timestamp and read the date and time. The timestamp 1700000000 is November 14, 2023, 22:13:20 UTC. The converter detects seconds, milliseconds, microseconds and nanoseconds by digit count, and the Local time option shows the time in your device's time zone.

You can enter seconds, milliseconds, microseconds or nanoseconds. The unit is recognized by the number of digits.

UTC
Time zone

With UTC the time is shown with no offset, the way logs and databases store it. With local time it is shown in the time zone set on your device, together with the offset.

to

What is a Unix timestamp, or epoch time?

A Unix timestamp, also called Unix time or epoch time, is the number of seconds that have passed since the start of 1970 in UTC[1]. Its zero point is midnight on January 1, 1970, known as the Unix epoch. UTC is Coordinated Universal Time, the reference from which time zones around the world are counted.

The counting method is set out in POSIX, the shared standard for Unix-like systems. In it, every day has exactly 86,400 seconds[2]. Leap seconds added to UTC get no numbers of their own in this count[1].

A timestamp carries no time zone information[3]. The number 1700000000 describes the same moment in New York and in London. Only the time shown on clocks in the two cities at that moment differs.

Five wall clocks labeled Sídney, Londres, Monterrey, Vancouver and New York
Clocks for five cities show five different times. One Unix timestamp describes the same moment on all five dials, and only the time read in each zone differs. Photo: Luis Cortes, Unsplash.

What date is a Unix timestamp?

The Unix timestamp 1700000000 is November 14, 2023, at 22:13:20 UTC. In New York it was 5:13:20 PM, because Eastern Standard Time is five hours behind UTC[4].

You can read the date for any timestamp in the converter above. Paste the number into the Unix Timestamp field, and the date appears in the Date and time field as you type. Below the result, the converter tells you which unit it read the number in.

It recognizes the unit by the number of digits. A current timestamp in seconds has ten digits. A value from JavaScript has thirteen, because Date.now() returns milliseconds[5]. The result of time.time_ns() in Python has nineteen digits, because that function counts nanoseconds[6].

The Local time option in the Time zone switch shows the time in your device's time zone, with the zone offset added. In New York that offset is -05:00 in winter and -04:00 in summer[4].

For the reverse, use the date to Unix timestamp converter.

How do you convert a Unix timestamp to a date? Formula and example

In Unix time, every day has exactly 86,400 seconds[2]. To turn a timestamp into a date, divide it by 86,400. The whole part of the result is the number of full days since January 1, 1970. The remainder is the time of that day in seconds.

Take the timestamp 1700000000. Dividing it by 86,400 gives 19,675 full days. The remainder is 80,000 seconds.

If January 1, 1970 counts as day zero, day 19,675 is November 14, 2023. The remainder is the time of that day: 80,000 seconds is 22 hours, 13 minutes and 20 seconds. The full result is 2023-11-14 22:13:20 UTC.

Divide a timestamp in milliseconds by 1,000 first, one in microseconds by a million, and one in nanoseconds by a billion. The converter above does this division itself before it works out the date. The date to Unix timestamp converter does the reverse, from a date to a number of seconds.

Convert a hexadecimal timestamp, such as 6553F100, to a decimal number first. The decimal to hex converter does this after you click Swap order. The value 6553F100 is 1700000000 in decimal.

What dates do round Unix timestamps stand for?

We collected round and boundary timestamps: the epoch, the days around it, each further hundred million seconds, the timestamp with the digits 1 to 0 in order, and the limits of a 32-bit integer. All dates are in UTC, the way the converter shows them with the UTC option.
TimestampDate and time in UTCWhat this value marks
-21474836481901-12-13 20:45:52Smallest 32-bit signed integer
-864001969-12-31 00:00:00One day before the epoch
-11969-12-31 23:59:59Last second before the epoch
01970-01-01 00:00:00Unix epoch
864001970-01-02 00:00:00End of the first day
10000000002001-09-09 01:46:40One billion seconds
12345678902009-02-13 23:31:30Digits 1 to 0 in order
15000000002017-07-14 02:40:001.5 billion seconds
16000000002020-09-13 12:26:401.6 billion seconds
17000000002023-11-14 22:13:201.7 billion seconds
17356896002025-01-01 00:00:00Start of 2025
17672256002026-01-01 00:00:00Start of 2026
18000000002027-01-15 08:00:001.8 billion seconds
20000000002033-05-18 03:33:20Two billion seconds
21474836472038-01-19 03:14:07Largest 32-bit signed integer
41024448002100-01-01 00:00:00Start of 2100
42949672952106-02-07 06:28:15Largest 32-bit unsigned integer
The timestamp 1234567890, with the digits 1 to 0 in order, is February 13, 2009, at 23:31:30 UTC[1]. In New York it was 6:31:30 PM. A counter stored as a 32-bit signed integer overflows after the value 2147483647. Its value then becomes -2147483648, which is December 13, 1901[7]. In binary, 2147483647 is 31 ones. The decimal to binary converter shows it in that form.

How can you tell whether a timestamp is in seconds, milliseconds or nanoseconds?

You can tell the unit by the number of digits. Every timestamp from September 9, 2001 to November 20, 2286 has ten digits in seconds. For current dates, the length in each unit therefore stays the same.
UnitDigits todayThe moment 1700000000 in this unitWhere you see it
Seconds101700000000time() in PHP, the exp claim in a JWT, timestamps on Discord
Milliseconds131700000000000Date.now() in JavaScript, EPOCHTODATE with unit 2
Microseconds161700000000000000EPOCHTODATE with unit 3
Nanoseconds191700000000000000000time.time_ns() in Python
The time() function in PHP returns the number of seconds since the epoch[3]. The exp, nbf and iat claims in a JWT hold a number of seconds that can have a fractional part[8]. Discord takes a timestamp in seconds[9]. Date.now() returns milliseconds[5], and time.time_ns() in Python returns nanoseconds[6]. The EPOCHTODATE function in Google Sheets takes unit 1 for seconds, 2 for milliseconds and 3 for microseconds[10].

Which formula or command converts a Unix timestamp to a date?

Each row turns the timestamp 1700000000 into November 14, 2023, 22:13:20 UTC. We checked the results of the date command, Python and JavaScript on this timestamp.
WhereFormula or commandResult for 1700000000
Excel=A1/86400+DATE(1970,1,1)2023-11-14 22:13:20 once the cell has a date and time format
Excel, timestamp in milliseconds=A1/86400000+DATE(1970,1,1)The same date for the value 1700000000000
Google Sheets=EPOCHTODATE(A1)Date and time in UTC
Google Sheets, milliseconds=EPOCHTODATE(A1, 2)Date and time in UTC for the value 1700000000000
MySQLSELECT FROM_UNIXTIME(1700000000);2023-11-14 22:13:20 when the session time zone is UTC
PostgreSQLSELECT to_timestamp(1700000000);2023-11-14 22:13:20+00 when the session time zone is UTC
Pythondatetime.fromtimestamp(1700000000, tz=timezone.utc)2023-11-14 22:13:20+00:00
JavaScriptnew Date(1700000000 * 1000).toISOString()2023-11-14T22:13:20.000Z
Linux, date commanddate -u -d @1700000000Tue Nov 14 22:13:20 UTC 2023
PowerShell 7.1 and laterGet-Date -UnixTimeSeconds 1700000000 -AsUTCDate and time in UTC in your regional format
MySQL returns the result of FROM_UNIXTIME in the session time zone, which is the zone set for the current connection[11]. PostgreSQL converts a timestamp with the to_timestamp function into the timestamp with time zone type[12]. PostgreSQL displays values of that type in the zone set in the TimeZone parameter[13]. In Python, the row needs the import from datetime import datetime, timezone. The utcfromtimestamp method has been deprecated since version 3.12, and the documentation recommends fromtimestamp with the UTC zone[14]. The date command takes a timestamp preceded by the @ sign[15]. Get-Date has had the -UnixTimeSeconds and -AsUTC parameters since PowerShell 7.1[16].

How do you set up the formula in Excel and Google Sheets so it shows a date?

For a single timestamp, the field above is faster. A spreadsheet converts a whole column of timestamps exported from a database with one formula dragged down.

  1. Excel: a formula with the DATE function

    Enter the timestamp in cell A1 and the formula =A1/86400+DATE(1970,1,1) in cell B1. In Excel, the DATE function takes the arguments year, month and day[17]. The formula divides the seconds by the number of seconds in a day and adds the result to the date January 1, 1970.
  2. Excel: a date and time format in the cell

    Excel stores dates as sequential serial numbers, and January 1, 1900 is serial number 1[17]. Cell B1 therefore shows a number of days with a fraction at first, about 45244.93. Press Ctrl+1, or Cmd+1 on a Mac, choose Custom on the Number tab and enter the format yyyy-mm-dd hh:mm:ss. You then see 2023-11-14 22:13:20[18].
  3. Excel: a workbook in the 1904 date system

    Excel can count dates from January 1, 1904, and the two date systems differ by 1,462 days[19]. In the 1900 system, January 1, 1970 is serial number 25569. In the 1904 system, the same day is serial number 24107. The DATE function returns the serial number in the workbook's own date system, so the formula gives the correct date in both systems.
  4. Google Sheets: the EPOCHTODATE function

    In Google Sheets, the formula =EPOCHTODATE(A1) is enough. A timestamp in milliseconds needs a second argument of 2, and a timestamp in microseconds an argument of 3. The result is in UTC, whatever time zone the spreadsheet is set to[10].
  5. US Eastern or UK time in the spreadsheet

    Both formulas give UTC. For Eastern Standard Time, subtract 5/24 from the result, which is five hours. During daylight saving time, subtract 4/24, because Eastern Daylight Time is four hours behind UTC[4]. For British Summer Time, add 1/24[20].

Why does the converter show a different time than clocks in the US or UK?

By default the converter shows UTC, because the timestamp itself is counted on that scale[1]. US Eastern Time is five hours behind UTC in winter and four hours behind during daylight saving time[4]. Daylight saving time in the US begins at 2:00 AM on the second Sunday of March and ends at 2:00 AM on the first Sunday of November[21].

The timestamp 1700000000 is therefore 22:13:20 in UTC and 5:13:20 PM in New York. In summer the difference is four hours. The timestamp 1782864000 is midnight UTC on July 1, 2026, and 8:00 PM on June 30 in New York.

UK clocks show Greenwich Mean Time in winter and are one hour ahead during British Summer Time[20]. The same timestamp 1782864000 is 1:00 AM on July 1 in London.

Databases work the same way. MySQL shows the result of FROM_UNIXTIME in the session time zone[11]. The same timestamp read in a session set to UTC and in a session set to America/New_York gives two different times.

The Local time option in the Time zone switch shows your local time with no offset to work out, as long as your device has the right time zone set. To get the timestamp for a specific local time, use the date to Unix timestamp converter.

Digital clock on a desk next to a keyboard, showing 10:03
A desk clock shows local time. The converter shows UTC by default, and the Local time option gives you the time a clock like this one displays. Photo: Andrei Anufrienko, Unsplash.

Sources

  1. Unix time — Wikipedia
  2. The Open Group Base Specifications Issue 8 (POSIX.1-2024), 4.19 Seconds Since the Epoch — The Open Group
  3. time — PHP Manual — The PHP Group
  4. Eastern Time Zone — Wikipedia
  5. Date.now() — MDN Web Docs
  6. time — Time access and conversions — Python Software Foundation
  7. Year 2038 problem — Wikipedia
  8. RFC 7519: JSON Web Token (JWT) — IETF
  9. Reference — Message Formatting — Discord Developer Documentation
  10. EPOCHTODATE — Google Docs Editors Help
  11. MySQL 8.4 Reference Manual, Date and Time Functions — Oracle
  12. PostgreSQL Documentation, Date/Time Functions and Operators — PostgreSQL Global Development Group
  13. PostgreSQL Documentation, Date/Time Types — PostgreSQL Global Development Group
  14. datetime — Basic date and time types — Python Software Foundation
  15. GNU Coreutils, Seconds since the Epoch — Free Software Foundation
  16. Get-Date (Microsoft.PowerShell.Utility) — Microsoft Learn
  17. DATE function — Microsoft Support
  18. Format a date the way you want — Microsoft Support
  19. Date systems in Excel — Microsoft Support
  20. When do the clocks change? — GOV.UK
  21. Daylight Saving Time Rules — National Institute of Standards and Technology

Every figure in the tables was computed from the unit definitions and checked arithmetically before publication. Historical values and the names of local units come from the sources listed above.

Content last reviewed: · written and checked by the Arteon team

Frequently asked questions about Unix timestamps

What is the current Unix timestamp?

The current timestamp goes up by one every second. In September 2026 it falls between 1788220800 and 1790812799. The expression Math.floor(Date.now() / 1000) in the browser console returns the exact value, because Date.now() returns milliseconds[5].

What does the exp claim in a JWT mean?

The exp claim gives the time on or after which the token must not be accepted. Its value is the number of seconds since January 1, 1970 UTC, ignoring leap seconds[8]. Paste it into the converter to see the date and time the token expires. The iat claim, the time the token was issued, and the nbf claim, the time before which the token must not be accepted, use the same format[8].

What is the Year 2038 problem?

A timestamp stored as a 32-bit signed integer reaches its largest value on January 19, 2038, at 03:14:07 UTC[1]. That value is 2147483647, or 7FFFFFFF in the decimal to hex converter. One second later the counter overflows and shows December 13, 1901[7]. Since version 5.6, released in 2020, the Linux kernel supports 64-bit time on 32-bit architectures as well[7].

Can a Unix timestamp be negative?

Yes. Negative values stand for moments before January 1, 1970[1]. The timestamp -86400 is December 31, 1969, at 00:00:00 UTC. The converter accepts a minus sign typed before the number.

How does Unix time handle leap seconds?

Every day in Unix time has exactly 86,400 seconds[2], so a leap second gets no number of its own. The GNU documentation gives an example from the end of 2016. The timestamp 1483228799 is December 31, 23:59:59 UTC, and the timestamp 1483228800 is already midnight on January 1, 2017. The second 23:59:60 has no timestamp[15].

How do I show a Unix timestamp in a Discord message?

Type <t:1700000000> in the message. Discord shows that moment in each reader's time zone and format. Add a style after a second colon: <t:1700000000:R> gives relative time, and <t:1700000000:F> gives the full date with the day of the week[9].

Why did Python deprecate utcfromtimestamp?

The datetime.utcfromtimestamp() method has been deprecated since Python 3.12. It returns an object without a time zone, and many datetime methods treat such an object as local time. The documentation recommends datetime.fromtimestamp(timestamp, tz=timezone.utc) instead[14].

Does the field accept commas, spaces and values in milliseconds?

Yes. You can group the digits in threes with commas, periods, spaces, underscores or apostrophes, as in 1,700,000,000 or 1.700.000.000. A single period or comma marks a fraction of a second, as in 1700000000.5. The converter recognizes milliseconds, microseconds and nanoseconds by the number of digits.

How do I convert a date back to a Unix timestamp?

Click Swap order. The date to Unix timestamp converter opens with the result from the Date and time field already entered. You enter a date there as 2023-11-14 22:13:20 or 2023/11/14 22:13.

Arteon free tool screenshot: Unix Timestamp to Date and Time – Epoch Converter

Help us improve our tools

Have an idea, found a bug, or want to suggest a feature? Drop us a message.