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
 
Back
Top