Skip to main content

XlFormatting.IsDateTimeFormatString Property

Gets or sets a value indicating whether the format string assigned to the XlFormatting.NetFormatString property is a date and time format string.

Namespace: DevExpress.Export.Xl

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

NuGet Package: DevExpress.Printing.Core

Declaration

public bool IsDateTimeFormatString { get; set; }

Property Value

Type Description
Boolean

true, if the .NET-style format string is used to format a date and time value in a cell; otherwise, false.

Remarks

If you specify the .NET number format for a numeric value in a cell using the XlFormatting.NetFormatString property of the XlCellFormatting object, it is required to set the IsDateTimeFormatString property to the appropriate value to distinguish between the standard number and date and time format specifiers. For example, the "d" format specifier can be interpreted as the decimal format specifier or as the short date format specifier, depending on the IsDateTimeFormatString property value.

Note that you can also use the static XlCellFormatting.FromNetFormat method to set the .NET number format for a cell value. For details, refer to the How to: Specify Number Format for Cell Content example.

See Also