Compares two numbers (or two date, character, or logical expressions) and returns the lesser value.

Syntax

MIN(<exp1>, <exp2>)

<exp1>

A numeric, date, character, or logical expression to compare to a second expression of the same type.

<exp2>

The second expression to compare to <exp1>.

Description

Use MIN( ) to compare two numbers to determine the lesser of the two values. You can use MIN( ) to ensure that a number is not greater than a particular limit.

MIN( ) may also be used to compare two dates, character strings, or logical values, in which case MIN( ) returns:

The earlier of the two dates. In dBASE Plus, a non-blank date is considered earlier than a blank date.

The character string with the lower collation value. Collation values are determined by the language driver in use, and are case-sensitive. For example, with the DB437US driver, the letter "a" is lower than the letter "b", but "B" is lower than "a" (all uppercase letters are collated lower than lowercase letters).

false if one or both logical expressions evaluate to false. (The logical AND operator has the same effect.)

If <exp1> and <exp2> are equal, MIN( ) returns their value.