ForHosting KIT · Dates & time

Date to .NET ticks converter

29 February 2024 at 12:34:56.1234567 with a +02:30 offset is 638447978961234567 ticks, counted in UTC. Enter a date and time with its offset to get the exact .NET tick count and the UTC moment it stands for. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Datetime
2024-02-29T12:34:56.1234567+02:30
You get
Utc datetime
2024-02-29T10:04:56.1234567Z
Dotnet ticks
638447978961234567
Tick unit
100 nanoseconds

Convert a complete ISO 8601 datetime into the exact tick count used by . NET DateTime values. The converter requires an explicit UTC designator or numeric offset, validates the Gregorian date and time, preserves fractions down to one hundred nanoseconds, and performs every calculation in UTC.

Provide an unambiguous ISO datetime

Enter a Gregorian calendar datetime in the form YYYY-MM-DDTHH:mm:ssZ, or replace Z with a numeric offset such as +02:30 or -05:00. Seconds are required because a . NET tick conversion represents a precise instant rather than an approximate date.

You may add from one through seven digits after the decimal point. Seven digits correspond exactly to the one-hundred-nanosecond resolution of a DateTime tick; shorter fractions are padded on the right, so .5 means five tenths of a second rather than five ticks. A timezone is mandatory.

Requiring it prevents the same text from producing different answers on computers configured for different local zones. The converter rejects impossible dates, leap seconds, hour 24, offsets outside the ISO range, and UTC-normalized instants outside years 0001 through 9999. Use uppercase Z and the literal T separator for a compact, auditable representation of the instant you intend.

Understand how the tick value is calculated

A . NET DateTime tick is one interval of one hundred nanoseconds since 0001-01-01T00:00:00 in the proleptic Gregorian calendar. The calculation first validates the year, month, day, hour, minute, and second. It then counts complete days before the supplied year, including Gregorian leap-year rules, adds complete days in the current year, and converts the time of day into seconds.

The stated numeric offset is subtracted to obtain UTC before the tick count is formed. Finally, seconds are multiplied by ten million and the seven-digit fractional component is added. No system clock, host timezone, network request, random value, or built-in Date parser participates.

The output therefore remains identical in a server worker and a browser in any timezone. Because almost every useful .

Use the normalized UTC result to verify integrations

The normalized UTC field is useful evidence: before accepting the integer, you can confirm that the supplied offset moved the clock and, when necessary, the calendar date in the expected direction. In C#, the numeric value corresponds to the ticks of the normalized UTC wall-clock value, with the epoch at year one; it does not include DateTime binary kind flags. Keep that distinction in mind when examining values produced by DateTime.ToBinary, DateTimeOffset storage conventions, or application-specific epochs.

The pair makes failures easier to diagnose: a wrong UTC field points toward offset handling, while matching UTC text with a different integer points toward epoch, precision, or numeric-rounding behavior.

Inspect legacy timestamp records

Convert a known ISO instant before comparing it with tick values stored in logs, exports, or older application tables.

Debug offset and precision errors

Check the canonical UTC datetime beside the tick count to separate timezone mistakes from fractional-second or integer-rounding problems.

What does one .NET tick represent?

One tick is one hundred nanoseconds. There are ten million ticks in one second.

Is a timezone required?

Yes. Use Z or an offset such as +01:00. Datetimes without a timezone are ambiguous and are rejected rather than interpreted using a host setting.

Are seven fractional digits supported?

Yes. The converter accepts one through seven fractional digits and pads shorter fractions to DateTime's seven-digit tick precision.

Does this include DateTime kind flags?

No. It returns the UTC calendar tick count since year one, not the additional flags used by representations such as DateTime.ToBinary.

What range of dates can I convert?

Any instant whose UTC time falls between the years 0001 and 9999. Impossible dates, leap seconds and the hour 24 are rejected, and so are offsets outside the usual range.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/date/date-to-dotnet-ticks

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/date/date-to-dotnet-ticks \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"datetime":"2024-02-29T12:34:56.1234567+02:30"}'
{
  "datetime": "2024-02-29T12:34:56.1234567+02:30"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "date.date_to_dotnet_ticks",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

Its result is returned as a decimal string so even very large tick values remain exact in JavaScript, JSON, spreadsheets, command-line tools, and cross-language integration tests.

Understand how the tick value is calculated

NET tick value is larger than JavaScript's exact integer limit, dotnet_ticks is deliberately returned as a decimal string. Treat that string as an integer in languages with 64-bit integer support, or keep it as text when moving it through JSON systems that may round large numbers.

Use the normalized UTC result to verify integrations

The response includes the original datetime, a canonical utc_datetime with exactly seven fractional digits, the exact dotnet_ticks string, and a plain-language tick unit. This is particularly helpful when comparing an API payload with C# logs, SQL exports, telemetry records, or legacy files whose timestamps were serialized as ticks.

Prepare cross-language test fixtures

Create exact expected tick strings for JavaScript, C#, database, and API integration tests without depending on a machine timezone.

Why is dotnet_ticks returned as a string?

Most DateTime tick values exceed JavaScript's safe integer range. A decimal string preserves every digit through JSON and browser code.

What does an API request cost?

Each API request costs $0.002. The browser version uses the same deterministic conversion logic.

Read the full KIT documentation →