Export (0) Print
Expand All
COM
Expand Minimize

CoDosDateTimeToFileTime function

Converts the MS-DOS representation of the time and date to a FILETIME structure used by Windows.

Note  This function is provided for compatibility with 16-bit Windows.

Syntax


BOOL CoDosDateTimeToFileTime(
  _In_   WORD nDosDate,
  _In_   WORD nDosTime,
  _Out_  FILETIME *lpFileTime
);

Parameters

nDosDate [in]

The MS-DOS date.

nDosTime [in]

The MS-DOS time.

lpFileTime [out]

A pointer to the FILETIME structure.

Return value

If the function succeeds, the return value is TRUE; otherwise, it is FALSE, probably because of invalid arguments.

Remarks

An MS-DOS date has the following format.

BitsDescription
0-4Days of the month (1-31).
5-8Months (1 = January, 2 = February, and so forth).
9-15Year offset from 1980 (add 1980 to get actual year).

 

An MS-DOS time has the following format.

BitsDescription
0-4Seconds divided by 2.
5-10Minutes (0-59).
11-15Hours (0-23 on a 24-hour clock).

 

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Objbase.h

Library

Ole32.lib

DLL

Ole32.dll

See also

CoFileTimeToDosDateTime
CoFileTimeNow

 

 

Community Additions

ADD
Show:
© 2014 Microsoft