Friday, March 6, 2009

Convert lastlogon or laslogontimestamp to date

It is always difficult to convert the large integer value on the account's property. The date is stored as a large integer. To convert it you can use the built in w32tm command:


w32tm /ntte 128787219065874052
[Output] 149059 06:45:06.5874052 - 2/10/2009 12:45:06 AM (local time)

w32tm /ntte 128805109570324972
[Output] 149079 23:42:37.0324972 - 3/2/2009 5:42:37 PM (local time)

------------ End of Document ------------------------
Tags: Active Directory, Windows Server 2003, Windows Server 2008
Published Date: 20090305

No comments: