WsFileTimeToDateTime function (webservices.h)

Takes a reference to a FILETIME object and converts it into a WS_DATETIME object. A reference to the WS_DATETIME object is returned by output parameter.

Syntax

HRESULT WsFileTimeToDateTime(
  [in]           const FILETIME *fileTime,
  [out]          WS_DATETIME    *dateTime,
  [in, optional] WS_ERROR       *error
);

Parameters

[in] fileTime

A pointer to the FILETIME structure to convert.

[out] dateTime

A pointer to the new WS_DATETIME object that has the newly converted time.

[in, optional] error

A pointer to a WS_ERROR object where additional information about the error should be stored if the function fails.

Return value

This function can return one of these values.

Return code Description
E_INVALIDARG
One or more arguments are invalid.
WS_E_INVALID_FORMAT
The input data was not in the expected format or did not have the expected value.

Remarks

A WS_DATETIME cannot represent dates from the year 10000 and beyond. A FILETIME representing a date later than this will cause the function return WS_E_INVALID_FORMAT. (See Windows Web Services Return Values.)

The format field of the WS_DATETIME will be set to WS_DATETIME_FORMAT_UTC.

Requirements

Requirement Value
Minimum supported client Windows 7 [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 R2 [desktop apps | UWP apps]
Target Platform Windows
Header webservices.h
Library WebServices.lib
DLL WebServices.dll