# Date or Value Range Checking

> [HTML Version](dateorvaluerangechecking.htm)

For numeric fields, when the type **v** is specified, the _setdef_ parameter must contain a two-element list consisting of the minimum allowed value and the maximum allowed value. For example, ",23,99,," would allow a range from 23 to 99. Note that the delimiter used to separate the two values must be a valid AMOS numeric delimiter, such as space, comma, or backslash.

For date fields, type **v** is not specified, and the _setdef_ parameter may be used to specify the first and last allowable dates. To use this feature, specify a standard format _setdef_ list with only two elements: the beginning and ending dates. The dates must be in YYMMDD (_xmax_=6) or YYYYMMDD (_xmax_=8) format (regardless of the input format).

Examples:

| **setdef string** | **Result** |
|------|------|
| /M/F// | Matches only \`M' or \`F' |
| ,TALL,SHORT,PORTLY,PETITE,, | Matches \`TALL', \`SHORT', \`PORTLY', or \`PETITE'. |
| |##-\*|@@#|| | Matches anything starting with 2 numeric digits followed by a dash, or any 3 character field in which the first two are alphabetic and the third numeric. |
| \\M@\*\\\\ | least two alphabetic characters, with the first one \`M'. (MR., MRS., MS., etc.) |
| \\850101\\851231\\\\ | When used with a date _type_ code (**D**, **d**, or **U**), will match any date between 1-Jan-85 and 31-Dec-85, inclusive. |
| ,-40,49,, | When used with _type_ **v** in a numeric field, will match only values ranging from negative 40 to positive 49.  |


