Member variable XbpDatePicker():customFormat Foundation

Defines formatting rules for a customized date format.

Attribute: EXPORTED
Data type: Character
Description

A character string defining formatting rules for the display of a date can be assigned to :customFormat. In this case, the member variable :format must be set to the constant XBPDP_FORMAT_CUSTOM. Formatting rules are defined as a combination of string fragments listed in the following table:

Characters defining formatting rules for the date
Characters Description
d The one- or two-digit day.
dd The two-digit day. (Single digit values are preceded by a zero).
ddd The two or three-character weekday abbreviation.
dddd The full weekday name.
M The one- or two-digit month number.
MM The two-digit month number. (Single digit month values are preceded by a zero).
MMM The three-character month abbreviation. The full month name.
y The one-digit year (2002 is displayed as "2").
yy The last two digits of the year (2002 is displayed as "02").
yyy The full year (that is, 2002 is displayed as "2002").

Characters defining formatting rules for the time
Characters Description
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).
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.
m The one- or two-digit minute.
mm The two-digit minute. (Single digit day values are preceded by a zero).
s The one- or two- digit seconds.
ss The two-digit seconds. Single digit values are proceeded by a zero.
t The one-letter AM/PM abbreviation ("AM" is displayed as "A").
tt The two-letter AM/PM abbreviation ("AM" is displayed as "AM").

In addition to these characters, a format string can contain additional text to be displayed along with a date. This text must be enclosed in single quotation marks. For example:

oXbp:customFormat := "Today is: 'ddd, dd MMMM" 

// is displayed as "Today is: Thu, 28 February" 

Note that the names for month and weekday are displayed in the language configured in the country settings of the operating system.

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.