Convert Windows FILTIME value to .NET DateTime

We have a database from third-party software, where it has the LastModifiedDate field, stored as a WINDOWS time file. We need to convert this to the .NET DateTime format and, in essence, have -ve values.

The .NET DateTime.FromFileTimeUtc method will work with + ve btu file time values ​​for -ve values, this will not work.

How do I convert the -ve filtedime value to a DateTime format? Samples: -ve value: -9094325347534722713 + ve value: 8872694038044633872

+3
source share
2 answers

. , DateTime, - 31 2009 9999. FILETIME 2650467743999999999. FILETIME , , DateTime.FromFileTime().

, , dbase. , FILETIME.dwLowDateTime. MSDN.

+3

Source: https://habr.com/ru/post/1725620/


All Articles