Prev: free tutorials
Next: print a Datagrid
From: Kenneth H. Young on 19 Jul 2006 08:24 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 20 Jul 2006 12:16 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 21 Jul 2006 07:15
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 >> |