Versions Compared

Key

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

Panel
bgColorwhite

MONTH


This function returns the month of a date or dateTime value. The month is returned as a number in the range 1 - 12.


Syntax

Code Block
MONTH ( date | dateTime )



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


Return type

  • integer


Examples

ExpressionResultType
MONTH ( DATE ( 2015 , 01 , 01 ) )1Integer
MONTH ( DATE ( 1978 , 04 , 11 ) ) 4Integer


Include Page
_nav_BackToTop
_nav_BackToTop


Panel
bgColorwhite

DAY


This function returns the day of a date or dateTime value. The day is returned as a number in the range 1 - 31.


Syntax

Code Block
DAY ( date | dateTime )



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


Return type

  • integer


Examples

ExpressionResultType
DAY ( DATE ( 2015 , 01 , 01 ) )1Integer
DAY ( DATE ( 1978 , 04 , 11 ) )11Integer


Back to top


Panel
bgColorwhite

HOUR


This function returns the hour of a dateTime value. The hour is returned as a number in the range 0 - 23.


Syntax

Code Block
HOUR ( dateTime )



Inputs
  • dateTime - The dateTime value of which the hour must be returned.


Return type

  • integer


Examples

ExpressionResultType
HOUR ( DATETIME ( 2015 , 5 , 25 , 00 , 00 , 00 ) )0Integer
HOUR ( DATETIME ( 2015 , 5 , 25 , 23 , 00 , 00 ) )23Integer


Back to top


Panel
bgColorwhite

MINUTE


This function returns the minute of a dateTime value. The minute is returned as a number in the range 0 - 59.


Syntax

Code Block
MINUTE ( dateTime )



Inputs
  • dateTime - The dateTime value of which the minute must be returned.


Return type

  • integer


Examples

ExpressionResultType
MINUTE ( DATETIME ( 2015 , 5 , 25 , 00 , 00 , 00 ) )0Integer
MINUTE ( DATETIME ( 2015 , 5 , 25 , 23 , 45 , 00 ) )45Integer


Back to top


Panel
bgColorwhite

SECOND


This function returns the second of a dateTime value. The second is returned as a number in the range 0 - 59.


Syntax

Code Block
SECOND ( dateTime )



Inputs
  • dateTime - The dateTime value of which the second must be returned.


Return type

  • integer


Examples

ExpressionResultType
SECOND ( DATETIME ( 2015 , 5 , 25 , 00 , 00 , 00 ) )0Integer
SECOND ( DATETIME ( 2015 , 5 , 25 , 23 , 45 , 59 ) )59Integer


Back to top


Panel
bgColorwhite

TODAY


This function returns the current date of the server. The date is given as base type date, formatted as dd-mm-yyyy.


Syntax

Code Block
TODAY


Return type

  • date


UI Text Box
typenote
The TODAY function returns a date stamp. It is only recalculated when the expression in which you use the TODAY function is reevaluated. This recalculation will not cause other expressions that use the TODAY function to be reevaluated.


Back to top


Panel
bgColorwhite

NOW


This function returns the current date and time of the server. The date and time are given as base type dateTime, formatted as dd-mm-yyyy HH:mm:ss.


Syntax

Code Block
NOW


Return type

  • dateTime


UI Text Box
typenote
The NOW function returns a date- and timestamp. It is only recalculated when the expression in which you use the NOW function is reevaluated. This recalculation will not cause other expressions that use the NOW function to be reevaluated.


Back to top

Panel
bgColorwhite

WEEKNUMBER


This function returns the week number within the year of a given date or dateTime value. The week number is returned as an integer in the range 1 - 53. Week 1 for a year is the earliest seven day period starting at Monday that contains at least 4 days from that year. This definition reflects the ISO 8601 Week dates definition.

For example, January 1, 2015 was a Thursday. Therefore week 1 of 2015 starts on December 29, 2014, and ends on January 4, 2015.


Syntax

Code Block
WEEKNUMBER ( date | dateTime )


Inputs

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


Return type

  • integer


Examples

ExpressionResultType
WEEKNUMBER ( DATE ( 2015 , 01 , 01 ) )1Integer
WEEKNUMBER ( DATETIME ( 2014 , 12 , 28 , 0 , 0 , 0 ) )1Integer
WEEKNUMBER ( DATE ( 2015 , 12 , 28 ) )53Integer
WEEKNUMBER ( DATE ( 2016 , 01 , 02 ) )53Integer
WEEKNUMBER ( DATETIME ( 2016 , 01 , 04 , 0 , 0 , 0 ) )1Integer


Back to top

Panel
bgColorwhite

DAYOFWEEK


This function 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