System.Windows.Forms.DateTimePicker.Format Property

Gets or sets the format of the date and time displayed in the control.

Syntax

[System.ComponentModel.RefreshProperties(System.ComponentModel.RefreshProperties.Repaint)]
public DateTimePickerFormat Format { set; get; }

Value

Documentation for this section has not yet been entered.

Remarks

This property determines the date/time format the date is displayed in. The date/time format is based on the user's regional settings in their operating system.

Note:

The DateTimePicker.Format property must be set to DateTimePickerFormat.Custom for the DateTimePicker.CustomFormat property to affect the formatting of the displayed date and time.

To display only time in a System.Windows.Forms.DateTimePicker, set the DateTimePicker.Format to DateTimePickerFormat.Time, and the DateTimePicker.ShowUpDown property to true.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0