How do I format an Active Directory Timestamp?
Time in Active Directory is stored in a 64 bit integer that keeps track of the number of 100-Nanosecond intervals which have passed since January 1, 1601 (not to be confused with EPOCH, or with Active Directory's Generalized Time String). The 64 bit value uses 2 32bit parts to store the time.
This number, e.g 127944393687163952 can be converted to a local timestamp such as:
cfTime = DateConvert("utc2Local",DateAdd('n',adTime / (60*10000000),'1/1/1601') );
This question was written by Tariq Ahmed.
It was last updated on July 12, 2006 at 12:00:53 PM EDT.
Categories
Comments
Comment made by Sid Wing on October 25, 2007 at 1:21 PM
This produces a date - but it is 2+ months different from the date stored in Active Directory... Any help would be appreciated.