DateTimePicker.Format Property
|
|
Sets the display format of the DateTimePicker control. The assign expects a string containing any of the following fragments:
Namespace:
VO
Assembly:
VOGUIClasses (in VOGUIClasses.dll) Version: 2.24 GA
Syntax VIRTUAL PROPERTY Format AS USUAL GET SET
public virtual Usual Format { get; set; } Request Example
View SourceProperty Value
Type:
UsualSets the display format of the DateTimePicker control. The assign expects a string containing any of the following fragments:
Remarks
Sets the display format of the DateTimePicker control. The assign expects a string containing any of the following fragments:
| Constant | Description |
|---|
| "d" | The one- or two-digit day. |
| "dd" | The two-digit day. Single-digit day values are preceded by a zero (0). |
| "ddd" | The three-character weekday abbreviation. |
| "dddd" | The full weekday name. |
| "h" | The one- or two-digit hour in 12-hour format. |
| "hh" | The two-digit hour in 12-hour format. Single-digit values are preceded by a zero(0). |
| "H" | The one- or two-digit hour in 24-hour format. |
| "HH" | The two-digit hour in 24-hour format. Single-digit values are preceded by a zero(0). |
| "m" | The one- or two-digit minute. |
| "mm" | The two-digit minute. Single-digit values are preceded by a zero(0). |
| "M" | The one- or two-digit month number. |
| "MM" | The two-digit month number. Single-digit values are preceded by a zero(0). |
| "MMM" | The three-character month abbreviation. |
| "MMMM" | The full month name. |
| "t" | The one-letter AM/PM abbreviation (that is, AM is displayed as "A"). |
| "tt" | The two-letter AM/PM abbreviation (that is, AM is displayed as "AM"). |
| "y" | The one-digit year (that is, 1999 would be displayed as "9"). |
| "yy" | The last two digits of the year (that is, 1999 would be displayed as "99"). |
| "yyy" | The full year (that is, 1999 would be displayed as "1999"). |
Examples
This example displays the current time only on the date time picker control:
1oDTPicker:Format := "hh:mm:ss"
This example displays a string along with the date:
1ODTPicker:Format := "'Today is' dddd, MMMM d, yyy"
2
See Also