Back to Devexpress

ChartData.FromDateTime(DateTime, Boolean) Method

officefileapi-devexpress-dot-spreadsheet-dot-charts-dot-chartdata-dot-fromdatetime-x28-system-dot-datetime-system-dot-boolean-x29.md

latest2.4 KB
Original Source

ChartData.FromDateTime(DateTime, Boolean) Method

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

Namespace : DevExpress.Spreadsheet.Charts

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
public static ChartData FromDateTime(
    DateTime value,
    bool use1904DateSystem
)
vb
Public Shared Function FromDateTime(
    value As Date,
    use1904DateSystem As Boolean
) As ChartData

Parameters

NameTypeDescription
valueDateTime

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

TypeDescription
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

ChartData Class

ChartData Members

DevExpress.Spreadsheet.Charts Namespace