Skip to main content

7.13.8 DAY_OF_WEEK

Function

Input date data of DATE type, and calculate the number of days in the weekly cycle to be output

LD graphics

DAY_OF_WEEK

Parameter description

Interface variableDeclarationData typeDescription
INVar_DateDATEDate
Function nameReturn valueINTAny integer type
  • If the input DATE is illegal, the return value is -1.

Example

  • An LD example is shown in the following animation:

DAY_OF_WEEK_GIF

  • ST example is shown in the following code:
OUT:=DAY_OF_WEEK(IN1);