@Weekday (Formula Language)

Computes the day of the week and returns a number that identifies the day.

Syntax

@Weekday( time-date )

Parameters

time-date

Time-date or time-date list. The date having the weekday value you want.

Return value

weekdayNumber

Number or number list. Weekday numbers are 1 through 7, with Sunday = 1, Monday = 2, and so on.

Usage

If the parameter is a list, the function operates on each element of the list, and the return value is a list with the same number of elements.

Examples

  1. This example returns 5.
    @Weekday([9/29/88])
  2. This example returns 2 if the date in the response field happens to fall on a Monday.
    @Weekday(ResponseDate)
  3. This example returns the string Working on the Weekend if the contents of the field named ResponseDate is 7 (Saturday) or 1 (Sunday); otherwise, it returns the date the document was created as a text string.
    @If(@Weekday(ResponseDate) = 7 | @Weekday(ResponseDate) = 1;"Working on the Weekend";@Text(@Created)) 
  4. This example returns 5, 6, and 7 in a list.
    @Weekday([9/29/88] : [9/30/88] : [10/1/88])