This topic has not yet been rated - Rate this topic

IPOutlookApp::VariantTimeToSystemTime

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

The VariantTimeToSystemTime method converts the Variant representation of time to it's System Time equivalent.


HRESULT VariantTimeToSystemTime(
  DATE date,
   SYSTEMTIME * pst
);
date

[in] The Variant time date object to convert.

pst

[out] Reference to system time equivalent. For information about the SYSTEMTIME structure, see SYSTEMTIME.

This method returns the standard values E_INVALIDARG, E_OUTOFMEMORY, E_UNEXPECTED, and E_FAIL, as well as the following:

S_OK

The method completed successfully.

A Variant time is stored as an 8-byte real value (double) representing a date between January 1, 100 and December 31, 9999, inclusive. The value 2.0 represents January 1, 1900; 3.0 represents January 2, 1900, and so on. Adding 1 to the value increments the date by a day. The fractional part of the value represents the time of day. Therefore, 2.5 represents noon on January 1, 1900; 3.25 represents 6:00 A.M. on January 2, 1900; and so on. Negative numbers represent the dates prior to December 30, 1899.

This method was needed for Windows Mobile devices running software prior to Pocket PC 2000. Its current implementation simply calls the Windows Embedded CE function VariantTimeToSystemTime, passing the same parameters. (DATE is type-defined as double in the file wtypes.h.)

Headerpimstore.h
LibraryPimstore.lib
Windows Embedded CEWindows CE 2.0 and later
Windows MobileWindows Mobile Version 5.0 and later
Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.