Skip to main content

ChartData.FromDateTime(DateTime, Boolean) Method

Converts the DateTime object to chart data using the specified date system.

Namespace: DevExpress.Spreadsheet.Charts

Assembly: DevExpress.Spreadsheet.v24.1.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

Declaration

public static ChartData FromDateTime(
    DateTime value,
    bool use1904DateSystem
)

Parameters

Name Type Description
value DateTime

A DateTime object that specifies a date and time value to be converted.

use1904DateSystem Boolean

true, if the 1904 date system is used; otherwise, false.

Returns

Type Description
ChartData

A ChartData object.

Remarks

Dates are stored in ChartData objects as numbers called serial values. A serial value is an integer that is the number of elapsed days from the first day in the date system. The SpreadsheetControl supports the 1900 and 1904 date systems for serial values.

When chart data is created using the FromDateTime method, the ChartData.BooleanValue and ChartData.IsNumeric properties return true.

See Also