Return the larger of two numeric or date values

     MAX(<nExp1>, <nExp2>) --> nLarger
     MAX(<dExp1>, <dExp2>) --> dLarger


     <nExp1> and <nExp2> are the numeric values to be compared.

     <dExp1> and <dExp2> are the date values to be compared.


     MAX() returns the larger of the two arguments.  The value returned is
     the same type as the arguments.


     MAX() is a numeric and date function that ensures the value of an
     expression is larger than a specified minimum.  The inverse of MAX() is
     MIN(), which returns the lesser of two numeric or date values.


     .  In these examples MAX() returns the greater of two numeric

        ? MAX(1, 2)                     // Result: 2
        ? MAX(2, 1)                     // Result: 2

     .  In these examples MAX() compares date values:

        ? DATE()                           // Result: 09/01/90
        ? MAX(DATE(), DATE() + 30)         // Result: 10/01/90
        ? MAX(DATE(), CTOD(""))            // Result: 09/01/90

 Files   Library is CLIPPER.LIB.

See Also: MIN()

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.