.NET ticks

.NET DateTime Ticks

100-nanosecond ticks since 0001-01-01 ↔ UTC date.

.NET ticks

Paste ticks, or pick a date.

.NET DateTime ticks count 100-nanosecond units since 00:00:00 on 1 January of year 1 in the proleptic Gregorian calendar. Paste a tick integer to see UTC, or pick a calendar date to encode midnight UTC as ticks. The Unix epoch is the well-known tick value 621355968000000000. This scale is not POSIX seconds, not Windows FILETIME, not Cocoa/NSDate, and not WebKit microseconds. Mixing those integers in a C# log parser is a standard outage report.

How to convert on this page

Digits-only input is treated as ticks. The engine subtracts the Unix-epoch tick constant, scales to milliseconds, and builds a UTC Date. Out-of-range values that JavaScript cannot represent are rejected. Date input without ticks encodes 00:00:00 UTC on that day and prints a C# hint of the form new DateTime(ticks, DateTimeKind.Utc).

Kind.Utc in that hint is a reminder: store UTC in logs. Kind.Local plus a server moved between zones rewrites history. Kind.Unspecified is how many serializers leak ambiguity. The integer ticks still mean “since year 1,” but the civil clock you print must name the kind.

Other 100-nanosecond clocks are not this one

Windows FILETIME counts 100-nanosecond units from 1 January 1601 UTC. Convert FILETIME on the FILETIME converter. The offset between year 1 and 1601 is a fixed tick gap; feeding FILETIME into DateTime.Ticks math without that gap yields dates in the sixteenth century or throws. LDAP/Active Directory timestamps are FILETIME values, not .NET DateTime ticks.

Unix seconds count from 1970. Multiply Unix seconds by 10,000,000 and add 621355968000000000 to reach DateTime ticks for that UTC second. This page performs that mapping when you pick a date (midnight) or when you paste ticks and it prints Unix seconds as a convenience line. Do not treat the Unix line as the native .NET storage format.

Frequently asked questions

What unit and epoch does a .NET DateTime tick count use?

Each tick is 100 nanoseconds. The count starts at 00:00:00 on 1 January of year 1 in the proleptic Gregorian calendar, not at 1970. Ten million ticks equal one second. DateTimeKind is separate metadata about UTC versus local display and does not change the meaning of the integer as elapsed ticks since year 1.

How do I convert a tick integer into a UTC timestamp?

Paste digits only into the input. The page subtracts 621355968000000000, scales to milliseconds, and prints UTC ISO and Unix seconds. Values JavaScript cannot represent are rejected. If the integer has about 13 digits, it is probably Unix milliseconds, not ticks; modern DateTime ticks are 18-digit numbers.

Why are .NET ticks different from Unix seconds and FILETIME?

Unix counts whole seconds from 1970. FILETIME counts 100-nanosecond units from 1601. DateTime ticks use the same 100-nanosecond unit as FILETIME but from year 1. Feeding FILETIME or Unix values into a Ticks field without conversion produces dates that are centuries off. LDAP timestamps are FILETIME, not DateTime ticks.

Processing, please wait...