Beispiel #1
0
        private DateTime GetDateTime(ushort date, ushort time)
        {
            FILETIME lpFileTime = new FILETIME();
            SYSTEMTIME  lpSystemTime = new SYSTEMTIME();
            DateTimeConvert.DosDateTimeToFileTime(date, time, lpFileTime);
            DateTimeConvert.FileTimeToSystemTime(lpFileTime, lpSystemTime);

            DateTime dateTime = new DateTime(lpSystemTime.wYear, lpSystemTime.wMonth, lpSystemTime.wDay,
                lpSystemTime.wHour, lpSystemTime.wMinute, lpSystemTime.wSecond, lpSystemTime.wMilliseconds);

            return dateTime;
        }
Beispiel #2
0
 public static extern bool FileTimeToSystemTime(FILETIME lpFileTime, SYSTEMTIME lpSystemTime );