Creator Help

getDayOfWeek

This topic describes the syntax and usage of the getDayOfWeek function in Zoho Creator .

Description

Returns the day of the week corresponding to a date. The day is given as an integer, ranging from 1 (Sunday) to 7 (Saturday), by default.

Syntax

<date>.getDayOfWeek()

(or)

weekDay(date)

// this format is supported only in the free flow scripting mode of Script builder.

The weekDay function syntax has the following arguments.

date  - The date of the day you are trying to find. The Date can be a date/date-time field or results of other formulas and functions.

The date can be a date or date-time field, the "today" variable which returns the current day, or results of other date functions, for example, datevalue()

Return Value

A number in the range 1 to 7. The number 1 represents a Sunday, 2 represents a Monday and so on.

 

Example

a. If "Transaction_Date" is Aug 21, 2013, the getDayOfWeek() function returns 4.

   TransactionDate.getDayOfWeek(); 
   weekDay(TransactionDate); 

Top