Wally,

I don't know if you figured this out yet or not, but using this page:

http://techtasks.com/code/viewbookcode/1607

And trying to convert that code to ColdFusion, I think I'm close, but not
quite there.  Here's what I have, maybe with this, you can figure it out (I
don't know what the correct date/time stamp actually is:

<cfset sLDAPDate = "128922162522263907">
<cfset iLogonTime = left(sLDAPDate,4) * (2^32) + right(sLDAPDate,4)>
<cfset iLogonTime = iLogonTime / (60 * 10000000) >
<cfset iLogonTime = iLogonTime / 1440 >
<cfset iLogonTime = iLogonTime + createDateTime(1601,1,1,0,0,0)>
<cfoutput>#dateFormat(iLogonTime,"mmmm dd, yyyy")#
#timeFormat(iLogonTime,"hh:mm:ss")#</cfoutput>

Dave Phillips

-----Original Message-----
From: Wally Randall [mailto:wally.rand...@comcast.net] 
Sent: Friday, July 31, 2009 3:31 PM
To: cf-talk
Subject: Decipher CFLDAP date values


When returning date/time values from active directory the CFLDAP tag
provides an integer value which must be decoded.  What is the formula for
converting the integer value to a human readable date?

example:  LASTLOGON returns "128922162522263907" 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:325159
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to