Translate int8 format

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

I want to translate the PwdLastSet and the LastLogon
attributes in AD. It returns a very cryptic # that makes
no sence. Does anyone know how to get a real date out of
this #?
 
Something like this?

PassWDDate = objRecordSet.Fields("pwdLastSet")

On Error Resume Next
Err.Clear
Set objDate = PassWDDate
If Err.Number <> 0 Then
Err.Clear
myRealDate = #1/1/1601#
Else
If (objDate.HighPart = 0) And (objDate.LowPart = 0 ) Then
myRealDate = #1/1/1601#
Else
myRealDate = #1/1/1601# + (((objDate.HighPart * (2 ^ 32)) _
+ objDate.LowPart)/600000000 - lngBias)/1440
End If
End If
Wscript.Echo myRealDate

HTH
Deji
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top