Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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.2.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