CURRENT EPOCH · EPOCHTIME.TOOLS · A PRECISION INSTRUMENT FOR TIME
Converter Batch Difference Blog
Languages
JavaScript Python TypeScript Go Rust Java PHP SQL Bash
Specialty
LDAP Timestamp .NET Ticks Chrome/WebKit Cocoa / Core Data Discord Timestamp Excel OADate Unix Hex
Standards
ISO 8601 Guide Year 2038 NTP Timestamp GPS Time Julian Day
01 Input
Paste an LDAP timestamp (large integer) or a date string
LDAP epoch is 1601-01-01 UTC, in 100ns intervals. Offset from Unix epoch: 11644473600 seconds.
02 Output
LDAP timestamp
Unix seconds
Unix milliseconds
ISO 8601 (UTC)
Human-readable

What is an LDAP timestamp?

Microsoft Active Directory and LDAP-based systems use a 64-bit integer to represent time. The value counts 100-nanosecond intervals elapsed since 1601-01-01 00:00:00 UTC. This is the same format used by Windows FILETIME.

You'll typically encounter it in attributes like lastLogon, pwdLastSet, accountExpires, and lastLogonTimestamp. The values look like enormous integers — typically 18 digits long.

Conversion formulas

LDAP → Unix seconds

unix_seconds = (ldap_value / 10_000_000) - 11_644_473_600

Divide by 10 million to get from 100ns intervals to seconds, then subtract the offset between 1601-01-01 and 1970-01-01.

Unix seconds → LDAP

ldap_value = (unix_seconds + 11_644_473_600) * 10_000_000

Special values

Code examples

PowerShell

# Convert LDAP timestamp to date
[DateTime]::FromFileTimeUtc(133829280000000000)
# → Wednesday, January 1, 2025 12:00:00 AM

# Convert date to LDAP timestamp
([DateTime]"2025-01-01 00:00:00").ToFileTimeUtc()

Python

from datetime import datetime, timezone

LDAP_EPOCH_DELTA = 11_644_473_600  # seconds between 1601 and 1970

def ldap_to_datetime(ldap_value: int) -> datetime:
    unix_seconds = (ldap_value / 10_000_000) - LDAP_EPOCH_DELTA
    return datetime.fromtimestamp(unix_seconds, tz=timezone.utc)

def datetime_to_ldap(dt: datetime) -> int:
    return int((dt.timestamp() + LDAP_EPOCH_DELTA) * 10_000_000)

JavaScript

const LDAP_OFFSET_SEC = 11644473600;

function ldapToDate(ldap) {
  const sec = (ldap / 10_000_000) - LDAP_OFFSET_SEC;
  return new Date(sec * 1000);
}

function dateToLdap(date) {
  return (Math.floor(date.getTime() / 1000) + LDAP_OFFSET_SEC) * 10_000_000;
}