Date


Use this type to construct validations for specific date formats. You can use this validation on attributes that have base type date.

Syntax

<comparedate><comparator><compareday><comparemonth><compareyear>
  • comparedate - Compare the attribute value to a specific date, the dateformat of this date should be 'yyyy/MM/dd'.

  • comparator - The type of comparison, this can be 'less', 'equal' and 'greater'.

  • compareday - There are three options:

    • a number between 1 and 31; the day part of the attribute value is compared with this value.

    • '+' followed by a number; the day part of the attribute value is compared with the current day '+' the specified number.

    • '–' followed by a number; the day part of the attribute value is compared with the current day '–' the specified number.

  • comparemonth - There are three options:

    • a number between 1 and 12; the month part of the attribute value is compared with this value.

    • '+' followed by a number; the month part of the attribute value is compared with the current month '+' the specified number.

    • '–' followed by a number; the month part of the attribute value is compared with the current month '–' the specified number.

  • compareyear - There are three options:

    • a number; the year part of the attribute value is compared with this value.

    • '+' followed by a number; the year part of the attribute value is compared with the current year '+' the specified number.

    • '–' followed by a number; the year part of the attribute value is compared with the current year '–' the specified number.

Examples

Suppose that TODAY = 07-10-2004.


ExplanationValidation rule
value = 01-02-2004<2004/02/01><equal>
value > 1 month from today<><greater><><+1>
value < 1 year ago<><less><><><-1>