Unix Timestamp Converter

Current unix timestamp

Human-readable date and time to timestamp

Frequent unix timestamps
secondsmilliseconds
now17662838881766283888155
24 hours ago17661974881766197488155
1 week ago17656790881765679088155

Language specific tips

Presto/Trino

--timestamp in seconds to human readable date
select from_unixtime(tx_date, 'America/Los_Angeles') as tx_date from transactions;

Javascript

// current ts in milliseconds:
Date.now()
// in seconds
Math.round(Date.now() / 1000)
// to human readable
new Date().toLocaleString()
// from string to timestamp
Date.parse('11/15/2020, 11:03:44 PM')

Java

// current ts in milliseconds:
System.currentTimeMillis();
// in seconds
System.currentTimeMillis() / 1000;

Python

# current ts in milliseconds:
import time
int(time.time() * 1000)
# in seconds
int(time.time())

Kusto/ksql

// timestamp to human
unixtime_milliseconds_todatetime(milliseconds)

Current Time

Your current time:

Loading...

Current time in UTC:

Loading...