WEEK_DAY()

WEEK_DAY()

Prototype
WEEK_DAY([date])

Introduced in API Version 2.7.20

Returns the day of the week that corresponds to a date.

Input Parameters

Parameters

Type

Default

Required

Description

Parameters

Type

Default

Required

Description

date

Datetime

Today

No

Date for which we want to know the day of the week.

If no date is specified, the current datetime (in the active session timezone) will be used

Return value

Type

Description

Type

Description

Number

A number in the range 1 - 7 (Monday - Sunday)

Execution

Always. Calculated on-the-fly whenever an ITEM of a FORM is changed (by means of form_set_answer(), or when the FORM is opened

Examples

Formula

Description

Formula

Description

WEEK_DAY("2021-05-06")

Result = 4 (Thursday)

WEEK_DAY()

Day of the week of the current date (in the active SESSION timezone)