AxHost.GetOADateFromTime(DateTime) Method
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 an OLE Automation date that corresponds to the specified DateTime structure.
protected:
static double GetOADateFromTime(DateTime time);
protected static double GetOADateFromTime(DateTime time);
static member GetOADateFromTime : DateTime -> double
Protected Shared Function GetOADateFromTime (time As DateTime) As Double
A double-precision floating-point number that contains an OLE Automation date equivalent to specified time
value.
The value of this instance cannot be represented as an OLE Automation Date.
An OLE Automation date is implemented as a floating-point number whose value is the number of days from midnight, 30 December 1899. For example, midnight, 31 December 1899 is represented by 1.0; 6 A.M., 1 January 1900 is represented by 2.25; midnight, 29 December 1899 is represented by -1.0; and 6 A.M., 29 December 1899 is represented by -1.25.
The base OLE Automation Date is midnight, 30 December 1899. The maximum OLE Automation Date is the same as MaxValue, the last moment of 31 December 9999.
For more information, see Automation.
Product | Versions |
---|---|
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9, 10 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: