dateFormatPattern

Specifies the date format code used to format any date selected in the ComboBox before it is sent to a database query. (See Radio Button/Check Box/Combo Box Properties for information on the 'Format Date Values Sent to Query' option.) This property should be set in the onInit handler. (See Add Dashboard Script for more information about handlers.)

The queryDateFormat property must be set to true to apply the format pattern.

Type

String

A date format code. (See Date Format for format codes.) The following restrictions apply:

  • Only the following format tokens are permitted: y, M, d

  • Only the following separators are permitted: -, /, ., comma, space

  • A year token is required: yy or yyyy

  • A month token is required: M or MM

  • A day token is required: d or dd

    Examples
    Format Valid Reason

    yyyy-MM-dd

    yes

    valid

    MM/dd/yyyy

    yes

    valid

    dd.MM.yyyy

    yes

    valid

    yyyy/MM/dd

    yes

    valid

    d-M-yyyy

    yes

    valid

    yyyy, MM d

    yes

    valid

    yyyy MM dd

    yes

    valid

    yyyy-MM

    NO

    missing d

    MM-dd

    NO

    missing y

    yyyy-MM-dd HH:mm

    NO

    H not allowed

    EEE, MMM d yyyy

    NO

    E not allowed

    yyyy_MM_dd

    NO

    _ not allowed

Example

ComboBox1.dateFormatPattern = 'yyyy-MM-dd';

Either syntax below can be used in component script:

dateFormatPattern            // unqualified
ComboBox1.dateFormatPattern  // qualified

For onInit/onRefresh scripts, and for component and property scripts on other components, the second (qualified) form is required.