<< Click to Display Table of Contents >> DateTime_FromOADate(ClrDouble,ClrDateTime) Method |
![]() ![]() ![]() |
Show/Hide Hidden Text |
Returns a system DateTime equivalent to the specified OLE AutomationDate.
extern "C" HRESULT __stdcall DateTime_FromOADate(ClrDouble DateTimeAsDouble, ClrDateTime &DateTime); |
function DateTime_FromOADate(DateTimeAsDouble: ClrDouble; var DateTime: ClrDateTime): HRESULT; stdcall; |
Parameters
DateTimeAsDouble
Type: ClrDouble
An OLE Automation Date value.
DateTime
Type: ClrDateTime
An object that represents the same date and time as DateTimeAsDouble.
Type: HRESULT
If the function succeeds, the return value is zero.
If the function fails, the return value is the error code. To get extended error information, call Exception_GetExceptionForErrorCode.
The date is not a valid OLE Automation Date value. |
The DateTimeAsDouble parameter is a double-precision floating-pointnumber that represents a date as the number of days before or after thebase date, midnight, 30 December 1899. The sign and integral part ofDateTimeAsDouble encode the date as a positive or negative daydisplacement from 30 December 1899, and the absolute value of thefractional part of DateTimeAsDouble encodes the time of day as a fractionof a day displacement from midnight. DateTimeAsDouble must be a valuebetween negative 657435.0 through positive 2958465.99999999. |
The following example uses the DateTime_FromOADate method to instantiate a new DateTime value.
|
Reference |