C# DateTime FromOADate

Description

DateTime FromOADate returns a DateTime equivalent to the specified OLE Automation Date.

Syntax

DateTime.FromOADate has the following syntax.


public static DateTime FromOADate(
  double d
)

Parameters

DateTime.FromOADate has the following parameters.

  • d - An OLE Automation Date value.

Returns

DateTime.FromOADate method returns An object that represents the same date and time as d.

Example

Returns a DateTime equivalent to the specified OLE Automation Date.


using System;/*from  w  w w.j  a v  a2 s.c om*/
public class MainClass{
  public static void Main(String[] argv){  
    DateTime dt = DateTime.FromFileTimeUtc(12123123123L);
    System.Console.WriteLine(dt);
  }
}
    

The code above generates the following result.





















Home »
  C# Tutorial »
    System »




Array
BitConverter
Boolean
Byte
Char
Console
ConsoleKeyInfo
Convert
DateTime
DateTimeOffset
Decimal
Double
Enum
Environment
Exception
Guid
Int16
Int32
Int64
Math
OperatingSystem
Random
SByte
Single
String
StringComparer
TimeSpan
TimeZone
TimeZoneInfo
Tuple
Tuple
Tuple
Type
UInt16
UInt32
UInt64
Uri
Version