Format Property (DateTimePicker Control)
TOC
Collapse the table of content
Expand the table of content

Visual Basic: Windows Controls

Visual Studio 6.0

Format Property (DateTimePicker Control)

See Also   Example   Applies To

Returns or sets a value that determines the format type used to display text on the control.

Syntax

object.Format [= integer]

The Format property syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
integer A value specifying the format style used to display text in the control, as shown in Settings.

Settings

The settings for integer are:

Constant Value Description
dtpLongDate 0 Long Date Format (for example "Friday, Nov 14, 1972").
dtpShortDate 1 Short Date Format (for example "11/14/72").
dtpTime 2 Time Format (for example "5:31:47 PM").
dtpCustom 3 Custom format.

Remarks

Set the Format property to dtpCustom to use the CustomFormat property.

Show:
© 2016 Microsoft