Table of Contents

FlxDateTime.ToOADate Method

Overloads

FlxDateTime.ToOADate(DateTime, Boolean)

Converts a DateTime into a Double on Excel format for dates (Ole Automation Format).

Syntax

Namespace: FlexCel.Core

public static Double ToOADate(DateTime value, Boolean Dates1904)

Parameters

<-> Parameter Type Description
value DateTime DateTime you want to convert.
Dates1904 Boolean When true dates start at 1904 (pre-OSX macs) instead of 1900 (Windows)

Returns

The value as a double on Excel format.

See also

FlxDateTime.ToOADate(DateTime, Boolean, Boolean)

Converts a DateTime into a Double on Excel format for dates (Ole Automation Format).

Syntax

Namespace: FlexCel.Core

public static Double ToOADate(DateTime value, Boolean Dates1904, Boolean FirstIsDec1899)

Parameters

<-> Parameter Type Description
value DateTime DateTime you want to convert.
Dates1904 Boolean When true dates start at 1904 (pre-OSX macs) instead of 1900 (Windows)
FirstIsDec1899 Boolean If true, the minimum date returned will be Dec 31, 1899. If false, the minimum is Jan 1, 1900.
Note that none of them is valid of a date of 0. Excel shows 1900-01-00 in that case.

Returns

The value as a double on Excel format.

See also