FILETIME 객체이며 Excel 매크로를 사용하여 변환 할 수 있습니다.
옵션 명시
개인 유형 FILETIME dwLowDateTime as Long dwHighDateTime as Long End 유형
개인 유형 SYSTEMTIME 정수로 표시 정수로 wMonth 정수로 wDayOfWeek 정수로 정수 정수로 정수 w 소수로 정수 w 초로 정수 w 밀리 초 정수로 끝 유형
개인 선언 함수 FileTimeToSystemTime Lib "kernel32"(lpFileTime은 FILETIME, lpSystemTime은 SYSTEMTIME)
Function ConvertDate(test)
ConvertDate = Bit64ToDate(test)
'4/26/2010 8:32:27 PM
End Function
Private Function Bit64ToDate(Bit64) As Date
Dim High As Long, Low As Long, ft As FILETIME, st As SYSTEMTIME
GetTwoLongsFromInt64 [Bit64], ft.dwHighDateTime, ft.dwLowDateTime
FileTimeToSystemTime ft, st
Bit64ToDate = SystemTimeToVBTime(st)
End Function
'the following function - thanks to
'http://doc.xceedsoft.com/products/Xceedzip/64_bit_values.html
Private Sub GetTwoLongsFromInt64(ByVal cInt64 As Double, ByRef lHigh As Long, ByRef lLow As Long)
Dim cRemainder As Double
lHigh = CLng(Fix(cInt64 / 4294967296#))
cRemainder = cInt64 - (lHigh * 4294967296#)
If (cRemainder <= 2147483647#) Then
lLow = CLng(cRemainder)
Else
cRemainder = cRemainder - 4294967296#
lLow = (CLng(cRemainder))
End If
End Sub
'the following function - thanks to
'http://www.cpearson.com/excel/FileTimes.htm
Private Function SystemTimeToVBTime(SysTime As SYSTEMTIME) As Date
With SysTime
SystemTimeToVBTime = DateSerial(.wYear, .wMonth, .wDay) + _
TimeSerial(.wHour, .wMinute, .wSecond)
End With
End Function