From: Kenneth H. Young on
I have checked a large number of the users on the server using LDP as well
as Active Directory Users & Computers 'Additional Account Info' tab and they
are are populated with a date.



"Dirk_Drexlin_" <nospamdrexlin(a)nospamhgs-calw.de> wrote in message
news:4i63b2F27fc0U1(a)individual.net...
> Are you sure, the problem is your program and not the Active Directory?
>
> What value do you see when you check the properties of a user in the AD?
>
> Greetings
>
> Dirk


From: Travis Sharpe on
Anytime I retrieve the lastlogon value from AD, I use the following
calculation, it works fine for me.

Dim UserDE as new
DirectoryEntry("LDAP://cn=sharpe\,travis,ou=users,dc=cahs,dc=colostate,dc=edu")

Dim highpart,lowpart,lastlogon as long
highpart = UserDE.Properties("LastLogonTimeStamp")(0).HighPart
Lowpart = UserDE.Properties("LastLogonTimeStamp")(0).Lowpart
lastLogon = (HighPart * 2^32) - Lowpart

msgbox DateTime.FromFileTime(lastLogon)


Kenneth H. Young wrote:
> I have checked a large number of the users on the server using LDP as well
> as Active Directory Users & Computers 'Additional Account Info' tab and they
> are are populated with a date.
>
>
>
> "Dirk_Drexlin_" <nospamdrexlin(a)nospamhgs-calw.de> wrote in message
> news:4i63b2F27fc0U1(a)individual.net...
>> Are you sure, the problem is your program and not the Active Directory?
>>
>> What value do you see when you check the properties of a user in the AD?
>>
>> Greetings
>>
>> Dirk
>
>
From: Kenneth H. Young on
THANK YOU!

That works and is the simplest solution I have seen to date.


"Travis Sharpe" <user(a)anon.com> wrote in message
news:eWaKdfBrGHA.1648(a)TK2MSFTNGP02.phx.gbl...
> Anytime I retrieve the lastlogon value from AD, I use the following
> calculation, it works fine for me.
>
> Dim UserDE as new
> DirectoryEntry("LDAP://cn=sharpe\,travis,ou=users,dc=cahs,dc=colostate,dc=edu")
>
> Dim highpart,lowpart,lastlogon as long
> highpart = UserDE.Properties("LastLogonTimeStamp")(0).HighPart
> Lowpart = UserDE.Properties("LastLogonTimeStamp")(0).Lowpart
> lastLogon = (HighPart * 2^32) - Lowpart
>
> msgbox DateTime.FromFileTime(lastLogon)
>
>
> Kenneth H. Young wrote:
>> I have checked a large number of the users on the server using LDP as
>> well as Active Directory Users & Computers 'Additional Account Info' tab
>> and they are are populated with a date.
>>
>>
>>
>> "Dirk_Drexlin_" <nospamdrexlin(a)nospamhgs-calw.de> wrote in message
>> news:4i63b2F27fc0U1(a)individual.net...
>>> Are you sure, the problem is your program and not the Active Directory?
>>>
>>> What value do you see when you check the properties of a user in the AD?
>>>
>>> Greetings
>>>
>>> Dirk
>>

First  |  Prev  | 
Pages: 1 2
Prev: free tutorials
Next: print a Datagrid