AxHost.GetTimeFromOADate(Double) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a DateTime structure that corresponds to the specified OLE Automation date.
protected:
static DateTime GetTimeFromOADate(double date);
protected static DateTime GetTimeFromOADate (double date);
static member GetTimeFromOADate : double -> DateTime
Protected Shared Function GetTimeFromOADate (date As Double) As DateTime
Parameters
- date
- Double
The OLE Automate date to translate.
Returns
A DateTime that represents the same date and time as date
.
Exceptions
The date is not a valid OLE Automation Date value.
Remarks
The date
parameter is a double-precision floating-point number that represents a date as the number of days before or after the base date, midnight, 30 December 1899. The sign and integral part of date
encode the date as a positive or negative day displacement from 30 December 1899, and the absolute value of the fractional part of date
encodes the time of day as a fraction of a day displacement from midnight. date
must be a value between negative 657435.0 through positive 2958466.0.
Note that because of the way dates are encoded, there are two ways of representing any time of day on 30 December 1899. For example, -0.5 and 0.5 both mean noon on 30 December 1899 because a day displacement of plus or minus zero days from the base date is still the base date, and a half day displacement from midnight is noon.
For more information, see Automation.