Unix Timestamp Converter — Epoch Converter

Convert epoch and Unix timestamps to human-readable dates and back. Runs in your browser.

The current Unix epoch time is
0

Timestamp to human-readable date

Supports seconds, milliseconds, microseconds and nanoseconds (auto-detected).

Human-readable date to timestamp
Epoch dates for the start and end of a year, month or day
Convert seconds to days, hours and minutes

What is the Unix epoch?

The Unix epoch (also called Unix time, POSIX time or a Unix timestamp) is the number of seconds that have elapsed since January 1, 1970 at 00:00:00 UTC, not counting leap seconds. In ISO 8601 that moment is 1970-01-01T00:00:00Z. Strictly, the epoch is Unix time 0, but the word is often used for any Unix timestamp.

Systems that store the value as a signed 32-bit integer overflow on January 19, 2038 — the "Year 2038 problem". Modern 64-bit systems are not affected.

Timestamp lengths

UnitDigits (today)Example
Seconds101800000000
Milliseconds131800000000000
Microseconds161800000000000000
Nanoseconds191800000000000000000

How many seconds are in…

PeriodSeconds
1 hour3,600
1 day86,400
1 week604,800
1 month (30.44 days)2,629,743
1 year (365.25 days)31,557,600

Get the current epoch time in code

LanguageCurrent timeEpoch to date
JavaScriptMath.floor(Date.now()/1000)new Date(1800000000*1000)
Pythonimport time; time.time()time.ctime(1800000000)
PHPtime()date('r', 1800000000)
JavaSystem.currentTimeMillis()/1000new java.util.Date(1800000000L*1000)
C#DateTimeOffset.Now.ToUnixTimeSeconds()DateTimeOffset.FromUnixTimeSeconds(1800000000)
RubyTime.now.to_iTime.at(1800000000)
Gotime.Now().Unix()time.Unix(1800000000, 0)
DartDateTime.now().millisecondsSinceEpoch ~/ 1000DateTime.fromMillisecondsSinceEpoch(1800000000*1000)
MySQLSELECT UNIX_TIMESTAMP(NOW());SELECT FROM_UNIXTIME(1800000000);
PostgreSQLSELECT EXTRACT(EPOCH FROM now());SELECT TO_TIMESTAMP(1800000000);
SQLiteSELECT unixepoch();SELECT datetime(1800000000, 'unixepoch');
Linuxdate +%sdate -d @1800000000
macOSdate +%sdate -r 1800000000
PowerShell[DateTimeOffset]::Now.ToUnixTimeSeconds()[DateTimeOffset]::FromUnixTimeSeconds(1800000000)
Excel—=(A1/86400)+25569