class CO2GDateUtils
Brief
The class converts between the OLE Automation date, SYSTEMTIME, and the C time formats.
Details
All methods of the class are static. One does not need to have an instance of the class.
SYSTEMTIME is a time structure that is used by the Windows API functions to work with date and time.
The structure contains date and time, using individual members for month, day, year, weekday, hour, minute, second, and millisecond.
On Unix/Mac/IOS operating systems, the same structure is declared in the ForexConnect API headers.
The OLE automation DATE format is represented by an 8-byte floating-point number, counting days since midnight of December 30, 1899. Hours and minutes are represented as fractional days. So, a second is 1.0 / 86400.0, a minute is 1.0 / 1440.0 and an hour is 1.0 / 24.0. The format is used in OLE automation functions on Windows.
tm is a standard C structure for date representation. The structure contains calendar date and time broken down into components. The structure does not contain milliseconds. The structure is available on all operation systems and from any C/C++ compiler.
Example:
Format date from the OLE Automation DATE to a human-readable string. [show]
Static Public Methods | |
Converts the C time structure to the OLE Automation date. |
|
Converts the C time structure to the SYSTEMTIME structure. |
|
Converts the OLE Automation date (double) to the C time structure. |
|
Converts the OLE Automation date (double) to the SYSTEMTIME structure. |
|
Converts the SYSTEMTIME structure to the C time structure. |
|
Converts the SYSTEMTIME structure to the OLE Automation date (double). |