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只找到这个,可是没用呀!

解决方案 »

  1.   

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

  2.   

    For example, 6:00 am on 12/29/1899 is -1.25
    35065 is 1/1/1996 12:00 am
      

  3.   


    E9 4E ->时间部分 
    EF 3B ->日期部分那如何取呢?
      

  4.   

    4E 96 F0 3B,取出之后是一个数字,如何将这个数据转成日期时间型的呢?
      

  5.   

    Unit SysUtils
    type 
      TTimeStamp = record
        Time: Integer;  
        Date: Integer;  
      end;
    然后function FileDateToDateTime(FileDate: Integer): TDateTime;
      

  6.   

    补充A timestamp is a signed 32-bit integer, used by the OS to record information such as the date and time a file was modified. The precise format of a timestamp depends on the OS. Use FileDateToDateTime to convert a timestamp to a TDateTime value.For example, use FileDateToDateTime to convert the file timestamp returned by FileGetDate or FileAge to a value that can be used with other VCL routines and properties. You may also need to use FileDateToDateTime to convert the Time field of the TSearchRec record used by the FindFirst and FindNext functions.