Max(value1, value2, …, valueN)
Returns the maximum value.
Parameters
value:
The value to check. All values must be of the same type as value1. Null values are ignored.
Returns
The result is of the same type as value1.
Remarks
- For Numbers, it returns the greatest argument.
- For Texts, it returns the argument that sorts last alphabetically.
- For Durations, it returns the longest argument.
- For Dates, it returns the latest argument.
- For Timestamps, it returns the latest argument.
- For Times, it returns the latest argument.
- For Booleans, it returns the largest argument, treating false as less than true.
Examples
Max(50, 60, 70, 100)
returns 100.Max("Jane", "Rita", "Linda")
returns "Rita"Max(3d, 22h)
returns 3d (three days).Max(#2013-03-22#, #2013-05-15#)
returns the date value 2013-05-15.Max(ToTimestamp(#2013-03-22#), ToTimestamp(#2013-05-15#))
returns 05/15/2013 00:00.Max(ToTimeOfDay("3 pm"), ToTimeOfDay("8 pm"))
returns 20:00.Max(false, true, false)
returns true.