|
Binary Operators (act on multiple values) |
> |
<any> x, <any> y |
Boolean |
Returns true if x is greater than y, otherwise returns false. x and y must be the same type. For Numbers, the comparison is numerical. For Durations, the comparison is done using length of time represented. For Text, the comparison is done by alphabetical sort order. For Dates, Date/Time, and Time of Day values, the comparison is done by chronological order. For Booleans, false is less than true. |
3 > 4 returns false
[Actual Completion Date] >= [Projected Completion Date] returns true if the value in the the Actual Completion Date field is greater than the date in the Project Completion Date field.
Weeks(1) > Days(6) returns true
|
Display Reference |
More examples |
|
Dates |
DayOfWeek |
(Date d) |
Number |
Returns the number of days by which the given date d follows the first day of the week (Sunday returns 0). |
DayOfWeek([Start Date]) returns the number of the day of the week for the date that appears in the Start Date field.
DayOfWeek(ToDate("Aug 23, 2000")) returns 3
DayOfWeek(ToDate("Aug 20, 2000")) returns 0 |
Display Reference |
More examples |
|
Dates |
FirstDayOfPeriod |
(Date d, Duration p, Date r) |
Date |
Returns the first day of the period in which the date d falls.
The cycle of periods is defined by the given Duration p, repeated in sequence starting at the given reference date r. If the period p is not a whole number of days, the fractional part is ignored. |
Useful for handling biweekly pay periods.
FirstDayOfPeriod([date field], Weeks(2), Date(2000,5,1)) returns the date that is the start of the two week period in which the date in the date field falls. The initial two week period that starts the cycle begins on May 1, 2000.
FirstDayOfPeriod(Today(), Days(365), Date(2005,7,1)) returns the date July 1st of the current year-long period. Between 7/1/06 and 7/1/07 this would be July 1, 2006. (As the years go on, this method won't account for leap years.) |
Display Reference |
More examples |
|
Dates |
FirstDayOfWeek |
(Date d) |
Date |
Returns the first day (Sunday) of the week in which the date falls. |
FirstDayOfWeek([Start Date]) returns the date of the Sunday (first day of the week) in which the Start Date occurs.
FirstDayOfWeek(ToDate("7/30/2007")) returns the date 7-29-07 |
Display Reference |
More examples |
|
Dates |
LastDayOfWeek |
(Date d) |
Date |
Returns the last day (Saturday) of the week in which the date falls. |
LastDayOfWeek([Date A]) + Days(1) returns the Sunday date of the week that follows the one in which Date A falls. |
Display Reference |
More examples |
|
Aggregation |
Max |
(<any> x, <any> y, ...) |
<same type as x and y> |
This function can take 2 or more arguments of any data type, as long as they are all the same type. The result is the same data type as the arguments. Null values are ignored.
For Numbers, returns the argument that is greatest.
For Text, returns the argument that sorts last alphabetically.
For Durations, returns the argument that is longest.
For Dates returns the argument that is latest.
For Date/Time, returns the argument that is latest.
For TimeOfDays, returns the argument that is latest.
For Booleans returns the argument that is largest, treating false as less than true. |
Max (Days(2), Weeks(1)) returns 1 week
Max (10, 20, 30, 40) returns 40
Max (10, null, 30) returns 30
Max (null, null, null) returns null |
Display Reference |
More examples |
|
Aggregation |
Min |
(<any> x, <any> y, ...) |
<same type as x and y> |
This function can take 2 or more arguments of any data type, as long as they are all the same type. The result is the same data type as the arguments. Null values are ignored.
For Numbers, returns the argument that is least.
For Text, returns the argument that sorts first alphabetically.
For Durations, returns the argument that is shortest.
For Dates returns the argument that is earliest.
For Date/Time, returns the argument that is earliest.
For TimeOfDays, returns the argument that is earliest.
For Booleans returns the argument that is smallest, treating false as less than true. |
Min (10, 20, 30, 40) returns 10
Min ([Date1], [Date2]) returns whichever date field's value is earlier
Min (Days(2), Weeks(1)) returns 2 days
in (10, null, 30) returns 10
Min (null, null, null) returns null |
Display Reference |
More examples |
|
Dates |
NextDayOfWeek |
(Date d, Number n) |
Date |
Returns the first day after the given date d that falls on the weekday n.
n is a number from 0 to 6 with Sunday being 0, Monday being 1, Tuesday being 2, and so on. |
NextDayOfWeek([Date Submitted], 2) returns the first Tuesday that follows the Date in the Date Submitted field. |
Display Reference |
More examples |
|
Dates |
PrevDayOfWeek |
(Date d, Number n) |
Date |
Returns the last day before the given date d that falls on the weekday n.
n is a number from 0 to 6 with Sunday being 0, Monday being 1, Tuesday being 2, and so on. |
PrevDayOfWeek([Date Due], 5) returns the date of the last Friday that occurse before the Date Due. |
Display Reference |
More examples |
|
Durations |
ToDays |
(Duration d) |
Number |
Takes a Duration d, and returns the number of days contained in it. |
ToDays([Start Date] - Today()) returns the number of days until the Start date.
ToDays(Weeks(2)) returns 14
|
Display Reference |
More examples |
|
Dates |
ToWeekdayN |
(Date d) |
Date |
If the given date d is a weekday returns it, otherwise returns the next occurring weekday. |
To WeekdayN([Order Date]) returns the date in the Order Date field if it's a weekday. If not, it returns the date of the next weekday.
ToWeekdayN(ToDate("6/21/2003")) returns 6/23/2003 |
Display Reference |
More examples |
|
Dates |
WeekdayAdd |
(Date d, Number n) |
Date |
Returns the date that is n weekdays past the given date d. n may be negative to move backward in time. |
WeekdayAdd([Start], [Duration]) returns the date that results if you add the value in the Duration field to the date in the Start field and count only weekdays.
WeekdayAdd(ToDate("6/20/2003"), 2) returns 6/24/2003
WeekdayAdd(ToDate("6/24/2003"), -2) returns 6/20/2003
If you have a date field named "Start Date" and that field has a value of 6/23/2003, then WeekdayAdd([Start Date], -2) returns 6/20/2003 |
Display Reference |
More examples |
|
WorkDates |
WeekdayAdd |
(WorkDate d, Number n) |
WorkDate |
Returns the date obtained by adding n weekdays to the date d. The calculation includes the date d as one of the n days. For example, adding 2 days to 10/31/2003 which is a Friday will give you 11/03/2003 since it counts 10/31/2003 as 1 day and 11/03/2003 (a Monday) as the second day. |
WeekdayAdd([Start],5) returns the date 5 weekdays after the date in the Start field.
WeekdayAdd(ToWorkDate(ToDate("10/31/2003")), 2) returns 11/03/2003
WeekdayAdd([Field A], [Field B]) where Field A is a field of type WorkDate and Field B is a field of type Numeric. Assuming that the value of Field A is 10/31/2003 and the value of Field B is 2, the formula will return 11/03/2003
|
Display Reference |
More examples |
|
Dates |
WeekdaySub |
(Date d2, Date d1) |
Number |
Returns the number of weekdays in the interval starting with d1 and ending on the day before d2 (same as subtracting Dates, but the result is the number of weekdays instead of a Duration). It is the inverse of WeekdayAdd.
|
WeekdaySub([Finish], [Start]) returns the number of weekdays between the dates in the Start and Finish fields.
WeekdaySub(ToDate("6/24/2003"), ToDate("6/20/2003") ) returns 2
|
Display Reference |
More examples |
|
Dates |
WeekOfYear |
(Date d) |
Number |
Returns the number of weeks by which the given date d follows the first week of the year based on ISO standards. First day of week is a Monday. First week contains the first Thursday of January. |
WeekOfYear(ToDate("Aug 20, 2000")) returns 33
WeekOfYear(ToDate("Aug 20, 2000"), 1) returns 35 |
Display Reference |
More examples |