~/ KARANTH.OVH // ACTIVE DIRECTORY TIME DECODER

Active Directory Timestamp Converter (FILETIME / LDAP Int64)

Decode and encode Active Directory time formats in one place — lastLogonTimestamp, lastLogon, pwdLastSet, accountExpires, lockoutTime, Generalized Time (whenCreated), and negative interval values like maxPwdAge. Auto-detects the syntax, handles Microsoft “never” sentinels, and generates PSScriptAnalyzer-compliant PowerShell and LDAP filters.

⚡ Timestamp Input & Attribute Context
Format: — Attribute: Auto 100% Client-Side Tested: Windows Server 2025 · DFL 2025 · PowerShell 7.4 / 5.1
FILETIME, hex, Generalized Time, Unix epoch, negative interval, duration (42d / 30m) or a date. Dates without offset are UTC.
Override if auto-detect guesses wrong
Explains special values like 0 and “never”
AD always stores UTC
Try:
RepresentationValueUse It ForAction

Frequently Asked Questions

How do I convert lastLogonTimestamp to a human-readable date?

lastLogonTimestamp is a Windows FILETIME structure counting 100-nanosecond intervals since 1 January 1601 UTC. In PowerShell run [DateTime]::FromFileTimeUtc(133990000000000000). On any Windows command prompt run w32tm /ntte 133990000000000000.

What does pwdLastSet = 0 mean in Active Directory?

A value of 0 means the user must change their password at the next interactive logon. It is the only value besides -1 that can be written to the attribute manually. Writing -1 stamps the current UTC time, clearing the required change flag.

Why does accountExpires show 9223372036854775807?

9223372036854775807 (0x7FFFFFFFFFFFFFFF) is the maximum signed 64-bit integer. Active Directory uses this sentinel value, alongside 0, to represent an account that never expires. Do not convert this sentinel value to a date in audit reports.

What is the operational difference between lastLogon and lastLogonTimestamp?

lastLogon is exact but stored exclusively on the domain controller that processed the authentication request. lastLogonTimestamp replicates across all domain controllers in the domain, but is only updated when the stored value is older than msDS-LogonTimeSyncInterval (default 14 days, minus random 0–5 days).

How do I find inactive Active Directory accounts using an LDAP filter?

Calculate the FILETIME tick threshold for “current time minus N days” and filter with (lastLogonTimestamp<=THRESHOLD_TICKS). The PowerShell tab above automatically calculates this live threshold and generates ready-to-run queries.

// All calculations execute locally in your browser using native JavaScript BigInt arithmetic (100-ns precision). Zero telemetry or input values leave your browser.