Workflow Tools Control Yard

Home / Active Directory

Active Directory timestamp converter

Turn the 18-digit numbers in lastLogonTimestamp, pwdLastSet and accountExpires into dates, and dates back into numbers. It also reads Unix times, whenCreated values and the negative intervals used by password and lockout policy.

Date to timestamp

How the numbers work

Active Directory stores most times as a Windows FILETIME: the count of 100-nanosecond intervals since 1 January 1601, 00:00 UTC. Divide by 10,000,000 to get seconds, then subtract 11,644,473,600 to get Unix time.

The same conversion on Windows, without this page:

[datetime]::FromFileTimeUtc(134394336000000000)
w32tm /ntte 134394336000000000
[datetime]::new(2026, 11, 18, 0, 0, 0, 'Utc').ToFileTimeUtc()

Which attribute uses which format

AttributeFormatNotes
lastLogonFILETIMENot replicated. Each domain controller holds its own value, so the true last logon is the highest value across all of them. 0 means never.
lastLogonTimestampFILETIMEReplicated, but only rewritten when the stored value is 9 to 14 days old. Good for finding stale accounts, not for the exact last logon.
pwdLastSetFILETIME0 means the user must change the password at the next logon.
accountExpiresFILETIME0 and 9223372036854775807 both mean the account never expires.
badPasswordTimeFILETIMENot replicated, like lastLogon.
lockoutTimeFILETIME0 means the account is not locked out.
maxPwdAge, minPwdAgeNegative intervalA time span in 100-nanosecond units, stored as a negative number. -36288000000000 is 42 days.
lockoutDuration, lockOutObservationWindowNegative interval-18000000000 is 30 minutes.
whenCreated, whenChangedGeneralized timeText in the form 20261118000000.0Z: year, month, day, hour, minute, second, in UTC.

More Active Directory tools