Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
bgColorwhite

DAYOFWEEK

This function returns


Returns the number of the day within the week of a given date or dateTime value, as follows:
  • Sunday = 1
  • Monday = 2
  • Tuesday = 3
  • Wednesday = 4
  • Thursday = 5
  • Friday = 6
  • Saturday = 7


Syntax

Code Block
DAYOFWEEK ( date | dateTime )


Inputs
  • date or dateTime - The date or dateTime value of which the week number must be returned.


Return type
  • integer



Examples


ExpressionResultType
DAYOFWEEK ( DATE ( 2015 , 01 , 01 ) )5Integer
DAYOFWEEK ( DATETIME ( 2015 , 12 , 28 , 0 , 0 , 0 ) )2Integer
DAYOFWEEK ( DATE ( 2016 , 01 , 02 ) )7Integer
DAYOFWEEK ( ? )UNKNOWNInteger


Back to top