Why milliseconds usually have 13 digits
Modern dates are roughly 1.7 trillion milliseconds after the Unix epoch, which gives a 13-digit positive value. Digit count changes for earlier and far-future dates, so it should not be the only validation rule.
JavaScript precision
Date.now() returns whole milliseconds from the device clock. Multiplying that value can express microsecond or nanosecond units, but it cannot create new timing precision. Systems requiring measured sub-millisecond timing need an appropriate high-resolution clock and a carefully defined epoch relationship.
How to use this tool
Copy the milliseconds row for an API or database field documented in milliseconds. The seconds row is divided by 1,000; microsecond and nanosecond rows scale the same device-clock reading. They are not independent high-resolution clock measurements.
Worked input and output
| Input or setting | Expected result |
|---|---|
1700000000 · s | 1700000000000 · ms |
1700000000000 · ms | 1700000000000000 · µs |
1700000000000 · ms | 1700000000000000000 · ns |
Checks before using the result
An incorrect device clock produces an incorrect current value. This page does not synchronize your clock with an external time service. For a stored value, use timestamp to date and choose milliseconds. For execution duration, use a monotonic runtime timer; calendar time can move when the system clock is corrected.