Returns the day of week of a DATE value.
Informal Syntax:
DAY_OF_WEEK( In )
Formal Syntax:
DAY_OF_WEEK( In1:=expression )
Parameter | Type | Description |
---|---|---|
In | DATE | The calendar date. |
The function returns an INT value representing the day of week. 0 is returned for Sunday, 1 is returned for Monday, and so on.
Example | Return Value |
---|---|
DAY_OF_WEEK( D#2020-08-24 ) | INT#1 |
DAY_OF_WEEK( DT#2020-08-23-12:00:00 ) | INT#0 |
IEC 61131-3 Third Edition: Table 36.8.
Note: The function also returns the day of week of a DATE_AND_TIME value. The IEC 61131-3 Third Edition states the parameter should be a DATE value.
For other date and time functions.
For the meaning of terms used in Fernhill SCADA.