0
我正在使用不起作用的DirectorySearcher
過濾器,很可能是因爲來自Active Directory的accountExpires
屬性的錯誤形式。我想使用LDAP查找所有過期的帳戶,但是如何將DateTime.Now
轉換爲accountExpires
格式?我找到很多關於將accountExpires
轉換爲Datetime
格式的文件,但是沒有其他辦法。例如,我發現一個例子說:如何將日期時間轉換爲accountExpires AD屬性?
129383640000000000 is equivalent to Sat, 01 Jan 2011 14:00:00 GMT
我該如何做另一種方式?我知道這是100納秒,從1月1日1601的區間,但不知道如何計算這個