Epoch timestamp converter
Convert Unix timestamps and date strings with one input that automatically detects any format.
About Unix time
Unix timestamps give computer systems a common numerical representation of time, across formats and time zones.
What is Unix time?
Unix time represents a point in time as the number of seconds since January 1, 1970 at 00:00:00 UTC, excluding leap seconds. A Unix timestamp of 0 corresponds to 1970-01-01T00:00:00Z.
In practice, “epoch time,” “Unix time,” “POSIX time,” and “Unix timestamp” are often used interchangeably.
What formats do Unix timestamps use?
Unix timestamps can be expressed at different precisions. This converter supports seconds (10 digits), milliseconds (13), microseconds (16), and nanoseconds (19).
Number of digits is a useful shorthand, but it isn’t part of the Unix timestamp standard and can vary for dates far from the present, including those before September 2001.
Time interval reference
Timeframe
Seconds
1 hour
3,600
1 day
86,400
1 week
604,800
1 month (30.44 days)
2,629,743
1 year (365.24 days)
31,556,926
06:00:56
Milliseconds
1789624856205
Seconds
1789624856
Why we built epoch.to
A better timestamp converter, shaped by years of engineering and market data experience.
Between electronic market making and building market data infrastructure at Databento, our team has spent many years working with timestamps.
We built this converter for ourselves, because none of the existing online tools handled the cases we ran into every day.
Along the way, we added features around things we do most: copying values quickly, jumping to market session boundaries, and handling timezones across major exchanges.
It’s become part of our daily workflows, and we hope you’ll find it as useful as we have.
Developer cheatsheet
Quick references for working with epoch timestamps in your stack.
Python (3.3+)
Get current epoch
Datetime to epoch
Epoch to datetime
C (C11 + POSIX)
Get current epoch
Datetime to epoch
Epoch to datetime
C++ (C++20)
Get current epoch
Time point to epoch
Epoch to time point
Java (8+)
Get current epoch
Datetime to epoch
Epoch to datetime
C# (.NET Core 2.1+)
Get current epoch
Datetime to epoch
Epoch to datetime
Rust (chrono 0.4.31+)
Get current epoch
Datetime to epoch
Epoch to datetime
Go (standard library)
Get current epoch
Datetime to epoch
Epoch to datetime
JavaScript (ES5+)
Get current epoch
Datetime to epoch
Epoch to datetime
R (base R)
Get current epoch
Datetime to epoch
Epoch to datetime
MATLAB (R2014b+)
Get current epoch
Datetime to epoch
Epoch to datetime
PostgreSQL
Get current epoch
Datetime to epoch
Epoch to datetime
MySQL (5.6+)
Get current epoch
Datetime to epoch
Epoch to datetime
ClickHouse (20.1+)
Get current epoch
Datetime to epoch
Epoch to datetime
SQLite (3.42+)
Get current epoch
Datetime to epoch
Epoch to datetime
Shell (GNU coreutils)
Get current epoch
Datetime to epoch
Epoch to datetime
Shell (macOS / BSD)
Get current epoch
Datetime to epoch
Epoch to datetime