A client of mine asked me to extract Active Directory data (for example using ADSI Edit), filtering them for a datetime field, for example accountExpire.
Googling I found a string like this:
Well… The main focus is: what is the big Number (131906844000000000) in the query?
This number represent a date and time value in a file timeformat. In this case, this number is equal to 2018-12-31.
Here a simple way to convert a known format date to file time format using rextester.
This web site (http://rextester.com) allows you to write .Net Code and then run it using your browser.
Then you don’t need to install Visual Studio on your client, but you can easily type the code in the browser and then run it.
By follow this link, you can use my code without type anything.
You have only to replace the right date you want to convert in the line 17th.
DateTime dt = new DateTime(2018,12,31);
You can find the conversion result at the bottom of the page.