Back to Devexpress

How to: Format Date-Time Values Using the LongDate Pattern

windowsforms-2145-common-features-formatting-values-how-to-format-date-time-values-using-the-longdate-pattern.md

latest836 B
Original Source

How to: Format Date-Time Values Using the LongDate Pattern

  • Nov 13, 2018

The following code demonstrates how to format values in a DateEdit control using the Long Date pattern.

The result for the English (US) culture is displayed below.

csharp
using DevExpress.Utils;
// ...
dateEdit1.Properties.DisplayFormat.FormatType = FormatType.DateTime;
dateEdit1.Properties.DisplayFormat.FormatString = "D";
vb
Imports DevExpress.Utils
' ...
DateEdit1.Properties.DisplayFormat.FormatType = FormatType.DateTime
DateEdit1.Properties.DisplayFormat.FormatString = "D"