What’s the highest legal FILETIME? Is it safe to use?
cppdashboard.dev/r/2026/09/what-s-the-highest-legal-filetime-is-it-safe-to-useThis article discusses the challenges of defining a sentinel FILETIME value that is always considered later than another FILETIME. It explores the implications of using maximum values and the special meanings associated with certain FILETIME values.
From the article
A customer wanted to define a sentinel FILETIME that will be considered larger than another FILETIME . In other words, CompareFileTime should always say that the sentinel value is later. What’s a good value to use?
Strictly according to the definition, the FILETIME consists of ticks since January 1, 1601, and it is an unsigned value, so the highest value is presumably 0xFFFFFFFF`FFFFFFFF .
On the other hand, the documentation for FILETIME itself notes that some functions consider the value 0xFFFFFFFF`FFFFFFFF to have special meaning. For example, the SetFileTime function treats that value as meaning “Do not update the time for this handle.”
Share this resource