NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DateTime.FromOADate

Creates a DateTime from an OLE Automation Date.

[Visual Basic]
Public Shared Function FromOADate( _
   ByVal d As Double _
) As DateTime
[C#]
public static DateTime FromOADate(
   double d
);
[C++]
public: static DateTime FromOADate(
   double d
);
[JScript]
public static function FromOADate(
   d : double
) : DateTime;

Parameters

d
An OLE Automation Date value.

Return Value

The DateTime value that represents the same date and time as the specified OLE Date.

Exceptions

Exception Type Condition
ArgumentException If the date is not a valid OLE Automation Date value.

Remarks

The FromOADate value must be a value between negative 657435.0 through positive 2958466.0. It is stored as a double-precision floating point number.

See ToOADate and System.OAVariantLib class, or a MSDN Online Libary search at http://MSDN.com/library/default.asp for more information on OLE Automation.

See Also

DateTime Structure | DateTime Members | System Namespace | Double | System.OAVariantLib | ToOADate