Page History
Panel | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||
ADD PERIOD TO DATEThis function calculates Calculates a new date by adding a specified period to a specified date. Syntax
Inputs
Return type
Examples
01-01-2015 + 1 DAYS | INCREMENT_DAYS( 01-01-2015 , 1 ) | 02
Date | 01-01-2015
08-01-2015 | Date | 01-01-2015 + 1 MONTHS | INCREMENT_MONTHS( 01-01-2015 , 1 ) | 01-02-2015 | Date | 01-01-2015 + 1 YEARS | INCREMENT_YEARS( 01-01-2015 , 1 ) | 01-01-2016 Date |
| ||||||||||||||||||
Panel | ||||||||||||||||||||||||||||||
|
Code Block |
---|
dateTime + number period |
Return type
- dateTime
Examples
Back to top |
---|
bgColor | white |
---|
SUBTRACT PERIOD FROM DATE
This function calculates a new date by subtracting a specified period from a specified date.
Syntax
Code Block |
---|
date - number period |
- date - The date that you want to subtract the specified period from.
- number - Specifies how many periods you want to subtract from the date.
- period - A keyword that specifies which time unit to subtract. Valid units are DAYS, WEEKS, MONTHS and YEARS.
Return type
- date
Examples
Back to top |
---|
bgColor | white |
---|
SUBTRACT PERIOD FROM DATETIME
This function calculates a new dateTime by subtracting a specified period from a specified dateTime.
Syntax
Code Block |
---|
dateTime - number period |
- dateTime - The dateTime that you want to subtract the specified period from.
- number - Specifies how many periods you want to subtract from the dateTime.
- period - A keyword that specifies which time unit to subtract. Valid units are
DAYS, WEEKS, MONTHS, YEARS, HOURS, MINUTES
andSECONDS
.
Return type
- dateTime
Examples
31-12-2014 12:23:04
Back to top |
---|
bgColor | white |
---|
PERIOD BETWEEN
This function calculates the period between two date or dateTime objects. This function returns the number of full periods of the specified type between two dates or dateTimes.
Valid types for period are:
- SECONDS
- MINUTES
- HOURS
- DAYS
- WEEKS
- MONTHS
- YEARS
Syntax
Code Block |
---|
period BETWEEN date1 AND date2 |
- period - A keyword that specifies which time unit to return. Valid units are
DAYS
,WEEKS
,MONTHS
,YEARS
,HOURS
,MINUTES
andSECONDS
. - date1 - The date or dateTime value that represents the start date.
- date2 - The date or dateTime value that represents the end date.
UI Text Box | ||
---|---|---|
| ||
You can use the periods HOURS , MINUTES and SECONDS only if at least one of the dates is a dateTime object or expression. On the other hand, with the periods DAYS , WEEKS , MONTHS and YEARS , the time component of a datetime value is ignored. |
UI Text Box | ||
---|---|---|
| ||
The order in which the dates are placed is irrelevant. |
Return type
- integer
UI Text Box | ||
---|---|---|
| ||
If you prefer a functional syntax, you can call these methods as: |
Examples
Back to top |
---|
bgColor | white |
---|
WORKINGDAYS BETWEEN
This function calculates the working days between two date or dateTime objects. It returns the number of full working days between two dates or dateTimes. The default working days are Monday, Tuesday, Wednesday, Thursday and Friday. This default can be overridden by supplying a list with alternative working days.
Syntax
Code Block |
---|
WORKINGDAYS BETWEEN startDate AND endDate
WORKINGDAYS_BETWEEN ( startDate, endDate, workingDays ) |
date1 - The date or dateTime value that represents the start date.
date2 - The date or dateTime value that represents the end date.
UI Text Box | ||
---|---|---|
| ||
The order in which the dates are placed is irrelevant. |
Return type
integer
Examples
WORKINGDAYS BETWEEN DATE ( 2015 , 6 , 1 )
AND DATETIME ( 2015 , 6 , 2 , 12 , 0 , 0 )
WORKINGDAYS BETWEEN DATETIME ( 2015 , 5 , 29, 12 , 0 , 0 )
AND DATE ( 2015 , 5 , 31 )
Time is ignored
30-5 and 31-5 are Saturday and Sunday
Back to top |
---|
bgColor | white |
---|
YEAR
This function returns the year of a date or dateTime value. The year is returned as a number in the range 1 - 9999.
Syntax
Code Block |
---|
YEAR ( date | dateTime ) |
- date or dateTime - The date or dateTime value of which the year must be returned.
Return type
- integer
Examples
Back to top |
---|
bgColor | white |
---|
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 ) |
- date or dateTime - The date or dateTime value of which the month must be returned.
Return type
- integer
Examples
bgColor | white |
---|
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 ) |
- date or dateTime - The date or dateTime value of which the day must be returned.
Return type
- integer
Examples
Back to top |
---|
bgColor | white |
---|
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 ) |
- dateTime - The dateTime value of which the hour must be returned.
Return type
- integer
Examples
Back to top |
---|
bgColor | white |
---|
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 ) |
- dateTime - The dateTime value of which the minute must be returned.
Return type
- integer
Examples
Back to top |
---|
bgColor | white |
---|
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 ) |
- dateTime - The dateTime value of which the second must be returned.
Return type
- integer
Examples
Back to top |
---|
bgColor | white |
---|
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 | ||
---|---|---|
| ||
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 |
---|
bgColor | white |
---|
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 | ||
---|---|---|
| ||
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 |
---|
...
bgColor | white |
---|
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
...
Back to top |
---|
...
bgColor | white |
---|
DAYOFWEEK
...
- Sunday = 1
- Monday = 2
- Tuesday = 3
- Wednesday = 4
- Thursday = 5
- Friday = 6
- Saturday = 7
...
Code Block |
---|
DAYOFWEEK ( date | dateTime ) |
|
...
- date or dateTime - The date or dateTime value of which the week number must be returned.
...
- integer
...
|