请问如何读取文件中的32-bit Windows Time/Date Formats,4字节日期数据?(50分)

  • 主题发起人 主题发起人 redcoral
  • 开始时间 开始时间
R

redcoral

Unregistered / Unconfirmed
GUEST, unregistred user!
请问如何读取文件中的32-bit Windows Time/Date Formats,4字节日期数据?

Windows 98/Me: Windows DDK

File Date and Time Formats
There are two date and time formats used by the Win32 and INT 21h APIs. The DOS time format is

used in the INT 21h APIs. The date and time are stored as bit fields in a DWORD.

The hour, minute, and second are stored in the low-order word in the following format:

+---------------+---------------+
¦H¦H¦H¦H¦H¦M¦M¦M¦M¦M¦M¦S¦S¦S¦S¦S¦
+---------------+---------------+
15 0

Where "H" is the hour (zero through 23), "M" is the minute (zero through 59), and "S" is the

number of seconds divided by 2. For the new Create Time APIs, additional precision has been added

by specifying the 10 millisecond remainder in the 2-second interval that the DOS time format

provides for. This remainder can be a value between zero and 199.

The year, month, and day are stored in the high-order word in the following format:

+---------------+---------------+
¦Y¦Y¦Y¦Y¦Y¦Y¦Y¦M¦M¦M¦M¦D¦D¦D¦D¦D¦
+---------------+---------------+
15 0

Where "Y" is the year minus 1980, "M" is the month (1 = January, 2 = February, etc.), and "D" is

the day of the month (1 through 31).

The Win32 time format is used by the Win32 APIs. The date and time is stored in a 64-bit value

that represents the number of 100 nanoseconds since January 1st, 1601. This date was chosen

because it is 400 years prior to the start of a new century. At 100ns resolution 32 bits is good

for about 429 seconds (or 7 minutes) and a 63-bit integer is good for about 29,247 years.

Built on Thursday, July 19, 2001

只找到这个,可是没用呀!

比如E9 4E EF 3B是一个32位日期,在文件中是这样存的,可以取出,是一个Float类型的东西,整数部分是日期,小数部分是时间,不知道怎么取?


E9 4E ->时间部分
EF 3B ->日期部分

那如何取呢?

 
formatdatetime
 
接受答案了.
 
后退
顶部