0 out of 2 rated this helpful - Rate this topic

CoDosDateTimeToFileTime function

Applies to: desktop apps only

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

Minimum supported server

Windows 2000 Server

Header

Objbase.h

Library

Ole32.lib

DLL

Ole32.dll

See also

CoFileTimeToDosDateTime
CoFileTimeNow

 

 

Send comments about this topic to Microsoft

Build date: 3/7/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ