Quantcast
Channel: Classic ASP
Viewing all articles
Browse latest Browse all 488

Using Classic ASP to View AD attributes such as LastLogon and LastLogonTimeStamp

$
0
0

Hello,

I have spent far too many hours searching the web and testing different coding statements regarding this subject.  I can easily connect to our active directory data with the "Set obj..."  commands and I can display most all the attributes such as name, givenname, displayname...etc.  However, the lastlogon, lastlogontimestamp and Pwdlastset fields which I know are 64 bit object type fields are just impossible for me to manipulate.  I can see their UTC values in ADSI edit and I can even hard code those values into my formulas and get the correct date/time conversion but when I just can't read the attribute and make it work.  I get null values when I do a straight variable assignment.  I have read that I should break this down into two 32 bit values but I have no clue how to do this in classic ASP.  I have tried clever SELECT commands using CAST or CONVERT and FROM_UNIXTIME but none seem to work (the open statement fails most of the time with no real explanation).  Any suggestions would be greatly appreciated.

DJ Bradley

Bradley@edinboro.edu or

djbradley151@gmail.com


Viewing all articles
Browse latest Browse all 488

Trending Articles