Convert 18-digit LDAP/FILETIME timestamp to human-readable date
There are at least 2 types of LDAP timestamps, an 18-digit timestamp and a simpler timestamp that is based on a Year-Month-Day format (see below).
The 18-digit Active Directory timestamps, also named 'Windows NT time format', 'Windows FILETIME', 'Win32 FILETIME', 'SYSTEMTIME' or 'NTFS file time'. These are used in Microsoft Active Directory for pwdLastSet, accountExpires, LastLogon, LastLogonTimestamp, and LastPwdSet. The timestamp is the number of 100-nanosecond intervals since Jan 1, 1601 UTC (1 nanosecond = one billionth of a second).
The current LDAP/Win32 FILETIME is 134258838380000000
In scientific notation 13425883838e7
Enter number in full or in scientific/exponential notation:
Milliseconds are discarded (last 7 digits of the LDAP timestamp)
Create an 18-digit LDAP timestamp
Convert LDAP timestamps on Windows and other operating systems
In all examples below, replace 134116992000000000 with your LDAP timestamp.
On Microsoft Windows
w32tm.exe /ntte 134116992000000000
In PowerShell
(Get-Date 1/1/1601).AddDays(134116992000000000/864000000000)
This returns the UTC time.
On Linux
LDAP=134116992000000000 date -d @"$(echo "($LDAP / 10000000) - 11644473600" | bc)"
On Mac
LDAP=134116992000000000 date -r "$(echo "($LDAP / 10000000) - 11644473600" | bc)"
Using AWK
echo 134116992000000000 | awk '{print strftime("%Y-%m-%d %H:%M:%S", ($1 / 10000000) - 11644473600)}'
Using Python on command line
python -c "from datetime import datetime, timedelta; print(datetime(1601, 1, 1) + timedelta(microseconds=134116992000000000/10))"
Convert YMD LDAP timestamps
These LDAP timestamps are much simpler and start with the year. The timestamp has the following format: YYYYMMDDHHMMSST. T is the time zone which is usually 'Z' (Zulu Time Zone = UTC/GMT). The tool below can only handle Zulu timestamps.
The current YMD timestamp is 20260614041038Z
Enter your timestamp: