A .NET DateTime ticks value is a count of 100-nanosecond intervals from 0001-01-01T00:00:00. It is useful only when its source epoch and unit travel with it; the number by itself does not announce which clock it belongs to.

Conversion rule

Unix milliseconds = ticks / 10000 − 62135596800000

The converter applies that relationship and returns Unix seconds, epoch milliseconds, ISO 8601 UTC, and a readable UTC value. Keep the original value as well when investigating a log or export so the conversion can be checked later.

Where mistakes happen

The number is too large for safe JavaScript Number arithmetic. Convert tick values with BigInt to keep the low-order digits intact.

A safer workflow

  • Identify the platform and field name before doing arithmetic.
  • Preserve the original value as a string when it may exceed JavaScript safe-integer precision.
  • Convert once at the boundary, then store or compare a declared Unix unit.
  • Format in a named timezone only when presenting the resulting instant to a person.

Frequent questions:

Q: How many ticks are in a second?
A: Exactly 10,000,000 ticks — each tick is 100 nanoseconds.
Q: What is the difference between .NET ticks and Windows FILETIME?
A: Both use 100-nanosecond units, but .NET ticks count from 0001-01-01 while FILETIME counts from 1601-01-01. They differ by a fixed offset of 504,911,232,000,000,000 ticks.
Q: How do I get Unix time from a C# DateTime?
A: Use new DateTimeOffset(dateTime.ToUniversalTime()).ToUnixTimeSeconds() or .ToUnixTimeMilliseconds().