Convertools Dev
All tools

Unix Timestamp in MySQL

Look up the current epoch time and convert between Unix seconds and UTC dates in MySQL.

Get the current timestamp

SELECT UNIX_TIMESTAMP();

Timestamp to date

SET time_zone = '+00:00';
SELECT FROM_UNIXTIME(1700000000);

Date to timestamp

SET time_zone = '+00:00';
SELECT UNIX_TIMESTAMP('2023-11-14 22:13:20');

Open 1700000000 in the converter

Current Unix time

Seconds—
Milliseconds—
UTC
—
My time zone
—

Official reference ↗

Free to use. Your input stays in this browser.

How to use it

  1. Copy the current-time example into your MySQL environment to read Unix seconds.
  2. Run the second example to display 1700000000 as a UTC date.
  3. Run the last example to convert that date back into seconds.

FROM_UNIXTIME and UNIX_TIMESTAMP(date) use the session time zone. Set it to +00:00 for these conversions to avoid DST ambiguity.