Converting Active Directory Date Time Attributes

To convert a date time attribute in Active Directory (e.g. as used by lastLogon) to a human readable date time, you can use the w32tm command.

For example with the following LDAP record:

dn: CN=John Smith,CN=Users,DC=DC=example,DC=com
lastLogon: 128326919184182832

Running

w32tm /ntte 128326919184182832

Will give the output

148526 12:38:38.4182832 - 27/08/2007 13:38:38 (local time)

See Microsoft Knowledge Base article 555936 for more information.

Tags: ,

Leave a Reply