Page tree

 

Support | BlogContact Us | 844.332.2821

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

D toc
Excerpt

Derives the numeric value for the day of the week (1, 2, etc.). Input must be a reference to a column containing Datetime values.

Info

NOTE: If the source Datetime value does not include a valid input for this function, a missing value is returned.

Tip

Tip: You can use the DATEFORMAT function to generate text versions of the day of the week. See Examples below.

D s
snippetBasic

Column reference example:

D code

derive value:WEEKDAY(MyDate)

Output: Generates a column of values containing the numeric weekday values derived from the MyDate column.

D s
snippetSyntax

D code

derive value:WEEKDAY(datetime_col)

ArgumentRequired?Data TypeDescription
datetime_colYdatetimeName of column whose weekday values are to be computed

d-s-lang-notes

datetime_col

Name of the column whose day-of-week value is to be computed.

  • Missing values for this function in the source data result in missing values in the output.
  • Multiple columns and wildcards are not supported.
Tip

Tip: You cannot insert constant Datetime values as inputs to this function. However, you can use the following: WEEKDAY(DATE(12,20,2017)).

D s
snippetusage

Required?Data TypeExample Value
YesDatetimemyDate

D s
snippetExamples

Example - Date of week functions

Include Page
EXAMPLE - Day of Week Functions
EXAMPLE - Day of Week Functions

D s also
labeldate