WEEKDAY

WEEKDAY returns a FIXED BINARY(31,0) value that is the number of days x converted to the day of the week, where 1=Sunday, 2=Monday, . . . 7=Saturday. If x is missing, it is assumed to be DAYS for today.

Read syntax diagramSkip visual syntax diagramWEEKDAY(x)
x
Expression. If present, x specifies the input date as days. If missing, x is assumed to be DAYS().

If x is missing and today's date is not available from the system, a result of zero is returned.

x must have computational type and will be converted to FIXED BINARY(31,0), if necessary.

For an example of WEEKDAY, see SECS.