Convert Milliseconds to Date

Many runtimes report time in milliseconds rather than seconds — JavaScript's Date.now() and Java's System.currentTimeMillis() both return 13-digit millisecond timestamps. Dividing by 1000 gives the classic Unix seconds value.

Paste your 13-digit value below to see the exact date and time. The tool keeps millisecond precision and also shows the equivalent seconds, microseconds, and nanoseconds.

Worked example

Input 1700000000000 converts to Tue, 14 Nov 2023, 22:13:20 UTC:

UTC
Tue, 14 Nov 2023, 22:13:20 UTC
ISO 8601 (UTC)
2023-11-14T22:13:20.000Z
RFC 3339 (UTC)
2023-11-14T22:13:20Z
RFC 2822
Tue, 14 Nov 2023 22:13:20 +0000
Unix seconds
1700000000
Unix milliseconds
1700000000000
Microseconds
1700000000000000
Nanoseconds
1700000000000000000
Hex (seconds)
0x6553f100
Binary (seconds)
1100101010100111111000100000000

Code examples

JavaScript
const d = new Date(1700000000000);
console.log(d.toISOString()); // 2023-11-14T22:13:20.000Z
Math.floor(Date.now() / 1000); // current epoch
Python
from datetime import datetime, timezone
print(datetime.fromtimestamp(1700000000, tz=timezone.utc))  # 2023-11-14T22:13:20.000Z
import time; int(time.time())
Go
package main
import ("fmt"; "time")
func main() {
  fmt.Println(time.Unix(1700000000, 0).UTC()) // 2023-11-14T22:13:20.000Z
  fmt.Println(time.Now().Unix())
}

See all 14 languages on the code examples pages.

Frequently asked questions

Why is my timestamp 13 digits instead of 10?
It is in milliseconds. Multiply seconds by 1000 to get milliseconds; divide by 1000 to go back. 13-digit values cover dates around the present day.
How do I convert milliseconds to seconds?
Integer-divide by 1000 (drop the last three digits). 1700000000000 ms = 1700000000 s.
Does JavaScript use seconds or milliseconds?
Milliseconds. Date.now() and getTime() return milliseconds since the epoch; divide by 1000 for Unix seconds used by most backends.

Related conversions

Copied