BLOG DateTime Ticks Breakdown 16 Feburary 2024 Previous post button Up to TOC button Next post button

Ticks 640000000000000000

For more than 20 years I've been looking at DateTime.Ticks Int64 values and they always look like 63nnnnnnnnnnnnnnnn, and I was wondering how long we must wait until the leading digits become 64. A little bit of C# script using the DateTimeOffset struct created the following table of waypoint tick values along the way to January 2029.

TicksSort DateLong DateSpanYears
6389000000000000002025-08-05 14:13:20Tuesday, 5 August 2025 14:13:20-3.00:08:14-0.01
6390000000000000002025-11-29 08:00:00Saturday, 29 November 2025 08:00:00112.17:38:250.31
6391000000000000002026-03-25 01:46:40Wednesday, 25 March 2026 01:46:40228.11:25:050.63
6392000000000000002026-07-18 19:33:20Saturday, 18 July 2026 19:33:20344.05:11:450.94
6393000000000000002026-11-11 13:20:00Wednesday, 11 November 2026 13:20:00459.22:58:251.26
6394000000000000002027-03-07 07:06:40Sunday, 7 March 2027 07:06:40575.16:45:051.58
6395000000000000002027-07-01 00:53:20Thursday, 1 July 2027 00:53:20691.10:31:451.89
6396000000000000002027-10-24 18:40:00Sunday, 24 October 2027 18:40:00807.04:18:252.21
6397000000000000002028-02-17 12:26:40Thursday, 17 February 2028 12:26:40922.22:05:052.53
6398000000000000002028-06-12 06:13:20Monday, 12 June 2028 06:13:201038.15:51:452.84
6399000000000000002028-10-06 00:00:00Friday, 6 October 2028 00:00:001154.09:38:253.16
6400000000000000002029-01-29 17:46:40Monday, 29 January 2029 17:46:401270.03:25:053.48
Table generation time: Friday, 8 August 2025 14:21:34

If you want to wait until the leading digit changes from 6 to 7 then we have to wait until .

If you're wondering when the 64‑bit signed Ticks value will overflow and cause a new epochal form of millenium bug, then we have to wait about 29.2 million years.


Ticks Breakdown

Here is a nice breakdown of the digits in a Ticks value. Remember that the least significant digit (rightmost) is 100 nanoseconds (10-7 seconds).

UTC Now
Friday, 16 February 2024 06:56:32
2024-02-16T06:56:32.2446131Z

Ticks
638,436,633,922,446,131

Seconds
63,843,663,392

DigitPowerSecondsSpanYears
61010000000000115740.17:46:40316.881
39100000000011574.01:46:4031.688
881000000001157.09:46:403.169
4710000000115.17:46:400.317
36100000011.13:46:400.032
651000001.03:46:400.003
641000002:46:40
33100000:16:40
3210000:01:40
911000:00:10
20100:00:01
2-10.100:00:00.1
4-20.0100:00:00.01
4-30.00100:00:00.001
6-40.000100:00:00.0001
1-50.0000100:00:00.00001
3-60.00000100:00:00.000001
1-70.000000100:00:00.0000001

Doodling

The Ticks property documentation says:

The value of this property represents the number of 100-nanosecond intervals that have elapsed since 12:00:00 midnight, January 1, 0001 in the Gregorian calendar, which represents MinValue.

Taking the popular approximation for the average length of a year being 365.25 days, we can divide the Ticks value by the number of 100 nanoseconds in an average year and add one (there was no year zero!) to get the approximate current year.

638893213025970129 60 ⁢× 60 ⁢× 24 ⁢× 365.35 ⁢× 10 7 + 1 = 2025.530424

The actual value is 2025.571883 years, so it's close enough for jazz, ignoring some as yet unidentified rounding issues.