This documentation is archived and is not being maintained.
DateTime.FromOADate Method
.NET Framework 1.1
Returns a DateTime equivalent to the specified 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
A DateTime that represents the same date and time as d.
Exceptions
| Exception Type | Condition |
|---|---|
| ArgumentException | The date is not a valid OLE Automation Date value. |
Remarks
d 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 the MSDN Online Library at http://MSDN.Microsoft.com/library/default.asp for more information on OLE Automation.
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also
DateTime Structure | DateTime Members | System Namespace | ToOADate
Show: