Table of Contents

TFlxDateTime.ToOADate Method

Overloads

TFlxDateTime.ToOADate(TDateTime, Boolean)

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

Syntax

Unit: FlexCel.Core

class function TFlxDateTime.ToOADate(const value: TDateTime; const Dates1904: Boolean): Double; static; overload;

Parameters

<-> Parameter Type Description
const value TDateTime DateTime you want to convert.
const 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

TFlxDateTime.ToOADate(TDateTime, Boolean, Boolean)

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

Syntax

Unit: FlexCel.Core

class function TFlxDateTime.ToOADate(const value: TDateTime; const Dates1904: Boolean; const FirstIsDec1899: Boolean): Double; static; overload;

Parameters

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