Skip to main content

DateTimeFormat Enum

Lists the values used to specify the formatting applied to date-time values.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v24.2.dll

NuGet Package: DevExpress.Wpf.Charts

Declaration

public enum DateTimeFormat

Members

Name Description
ShortDate

Displays a date using the short-date format specified in your computer’s regional settings.

LongDate

Displays a date using the long-date format specified in your computer’s regional settings.

ShortTime

Displays a time using the short-time format specified in your computer’s regional settings.

LongTime

Displays a time using the long-time format specified in your computer’s regional settings.

General

Displays a date and time, using the general date-time settings determined by your computer’s regional settings.

MonthAndDay

Displays a date as a month name and day number, using your computer’s regional settings (e.g., February 11).

MonthAndYear

Displays a date as a month name and year number, using your computer’s regional settings (e.g., February, 2006).

QuarterAndYear

Displays a date as a quarter value and year number using your computer’s regional settings (e.g., Q2 2006).

Note that you can apply formatting to the quarter’s value. To do this, set the DateTimeOptions.Format property to Custom, and define one of the following values for the DateTimeOptions.FormatString property:

q - Changes format to Roman numerals (e.g., IV);

qq - Changes format to Roman numerals with the Q prefix (e.g., QIV);

Q - Changes format to Arabic numerals (e.g., 4);

QQ - Changes format to Arabic numerals with the Q prefix (e.g., Q4).

Custom

The format string specified by the DateTimeOptions.FormatString property will be applied.

Related API Members

The following properties accept/return DateTimeFormat values:

Remarks

The values listed by the DateTimeFormat enumeration are used to set the DateTimeOptions.Format property.

Example

The following example demonstrates how to modify the DateTimeOptions.Format property value in XAML.

<dxc:XYDiagram2D.AxisX>
    <dxc:AxisX2D>
        <dxc:AxisX2D.Label>
            <dxc:AxisLabel TextPattern="{}{A:MMMM d}"/>
        </dxc:AxisX2D.Label>
    </dxc:AxisX2D>
</dxc:XYDiagram2D.AxisX>
See Also