There are 8 bytes binary value stored date and time in Registry.
84 8B D7 DF 8B 28 C5 01
I want to convert the binary value to date using VB.NET.
Dim a As FILETIME
a.dwHighDateTime = 29698187 '(01C5288B to decimal)
a.dwLowDateTime = -539522172 '(??????? by 84 8B D7 DF)
MsgBox (GetFileToSystemDate(a, False))
http://vbnet.mvps.org/index.html?cod...stshutdown.htm
*****************************************
Private Type FILETIME
dwLowDateTime As Long
dwHighDateTime As Long
End Type
Private Function GetFileToSystemDate(ft As FILETIME, _
Optional bIncludeTime As Boolean =
False) As String
Dim buff As String
Dim st As SYSTEMTIME 'system (UNC) time
Dim lt As SYSTEMTIME 'local time
Dim tz As TIME_ZONE_INFORMATION
If FileTimeToSystemTime(ft, st) Then
'retrieve the local time zone info
GetTimeZoneInformation tz
'convert the system time returned above
'to a local time taking the time zone
'info into account
SystemTimeToTzSpecificLocalTime tz, st, lt
'now just write it out
buff = Format$(DateSerial(lt.wYear, lt.wMonth, lt.wDay), "Long Date")
If bIncludeTime Then
buff = buff & " @ " & Format$(TimeSerial(lt.wHour, _
lt.wMinute, _
lt.wSecond), _
"Long Time")
End If
GetFileToSystemDate = buff
Else
GetFileToSystemDate = ""
End If
End Function
************************************************** *******
The vb6 code