This documentation is archived and is not being maintained.

DateTime.FromOADate Method

Returns a DateTime equivalent to the specified OLE Automation Date.

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


An OLE Automation Date value.

Return Value

A DateTime that represents the same date and time as d.


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


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 for more information on OLE Automation.


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