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:

   adTime = "127944393687163952";
   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.

Categories

Dates/Times

Comments

comments powered by Disqus