CUSTOMFORMAT Property


9.0, PLBCMP GUI Only

 

The CUSTOMFORMAT property defines a format string for the data displayed in an EDITDATETIME object. The property uses the following format:

 

CUSTOMFORMAT={value}

Note the following:

  1. CUSTOMFORMAT may be used in GETPROP or SETPROP statements of an EDITDATETIME object.

  2. {value} is a Character String Variable or Literal defining the format text.

  3. The FORMAT property of the EDITDATETIME must be set to $DTFORMATCUSTOM.

  4. The format string consists of a series of elements that represent a particular piece of information and define its display format. The elements are displayed in the order they appear in the format string.

  5. Date and time format elements are replaced by the actual date and time. They are defined by the following groups of characters as required by the Windows DateTimePicker control:

  6.  

    Element

    Description

    d

    The one- or two-digit day.

    dd

    The two-digit day. Single-digit day values are preceded by a zero.

    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.

    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 values are preceded by a zero.

    M

    The one- or two-digit month number.

    MM

    The two-digit month number. Single-digit values are preceded by a zero.

    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").

    yy

    The last two digits of the year (that is, 1996 would be displayed as "96").

    yyyy

    The full year (that is, 1996 would be displayed as "1996").

     

  7. Date elements are replaced by the actual date. They are defined by the following groups of characters as required by the jQuery Datepicker Widget control. In this case, these date elements are automatically translated from Windows formats to jQuery Datepicker Widget control formats. These date format string sequences are the same as expected for the Windows DateTimePicker control. These format string fields are translated to the format string fields expected for the jQuery DatePicker control when using the PL/B Web Server.

  8.  

    Element

    Description

    d

    The one- or two-digit day.

    dd

    The two-digit day. Single-digit day values are preceded by a zero.

    ddd

    The 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 values are preceded by a zero.

    MMM

    The three-character month abbreviation.

    MMMM

    The full month name.

    yy

    The last two digits of the year (that is, 1996 would be displayed as "96").

    yyyy

    The full year (that is, 1996 would be displayed as "1996").

     

    If these character sequences are specified in the 'CUSTOMFORMAT' format string, they are not translated and they remain in the format string sent to the client browser jQuery DatePicker control.:

     

     

    Element

    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 values are preceded by a zero.

    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").

     

  9. When using the PL/B Web Server, the CUSTOMFORMAT property is not supported when the PL/B EDITDATETIME FORMAT property is set to $DTFORMATTIME.

 

 

See Also: Object Properties, Object IO Instructions, Object Definitions



PL/B Language Reference CUETEXT Property DATA Property