Click to Rate and Give Feedback
MSDN
MSDN Library
.NET Development
.NET Framework 4
AxHost Class
AxHost Methods
 GetOADateFromTime Method
Collapse All/Expand All Collapse All
.NET Framework Class Library
AxHost..::.GetOADateFromTime Method

Returns an OLE Automation date that corresponds to the specified DateTime structure.

Namespace:  System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)
Visual Basic
Protected Shared Function GetOADateFromTime ( _
    time As DateTime _
) As Double
C#
protected static double GetOADateFromTime(
    DateTime time
)
Visual C++
protected:
static double GetOADateFromTime(
    DateTime time
)
F#
static member GetOADateFromTime : 
        time:DateTime -> float 

Parameters

time
Type: System..::.DateTime
The DateTime structure to translate.

Return Value

Type: System..::.Double
A double-precision floating-point number that contains an OLE Automation date equivalent to specified time value.
ExceptionCondition
OverflowException

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 about OLE Automation, see the MSDN Library.

.NET Framework

Supported in: 4, 3.5, 3.0, 2.0, 1.1, 1.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Processing
© 2012 Microsoft. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker