Skip to main content

XlVariantValue.DateTimeValue Property

Gets or sets the date and time value stored by the XlVariantValue object.

Namespace: DevExpress.Export.Xl

Assembly: DevExpress.Printing.v23.2.Core.dll

NuGet Package: DevExpress.Printing.Core

Declaration

public DateTime DateTimeValue { get; set; }

Property Value

Type Description
DateTime

A DateTime value.

Remarks

A date and time value is stored in the XlVariantValue object as a number (a serial value) and displayed in a cell according to the applied date and time format. A serial value specifies the number of elapsed days from the first day in the date system. The Excel Export Library uses the 1900 date system by default, which means the first date is January 1, 1900 and its serial value is 1.

If an XlVariantValue object contains a number, the DateTimeValue property returns the DateTime object which specifies a date and time value represented by that number. The number itself can be accessed using the XlVariantValue.NumericValue property.

See Also