.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

CellValue.IsDateTime Property

Gets whether the cell’s numeric value is displayed as date and time.

Namespace: DevExpress.Spreadsheet

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


public bool IsDateTime { get; }

Property Value

Type Description

true, if the number contained in a cell is displayed as data and time; otherwise, false


Dates and times are stored in cells as numbers that are displayed according to the applied date and time formats. So, if a cell displays a date and time value, both IsDateTime and CellValue.IsNumeric properties return true.

You can also use the CellValue.Type property to obtain the cell value type. This property returns CellValueType.DateTime, if a cell value is a number that is displayed as data and time.

The CellValue.NumericValue property returns the number contained in a cell, and the CellValue.DateTimeValue property returns the DateTime object, which specifies the date and time value represented by this number.

For more information on cell values, refer to the Cell Data Types and Dates and Times in Cells documents.

See Also