Date and Time functions
Date/time functions extract, transform or add elements to times or dates.
Rulex Platform formula | ||
---|---|---|
Function | Formula | Description |
addMonth(date, nmonth) | Adds a given number of months to a date attribute. | |
addQuarter(date, nquarter) | Adds a given number of quarters to a date attribute. | |
addWorkingDays(date, nday) | Adds a given number of working days (excluding weekends) to a date attribute. | |
addYear(date, nyear) | Adds a given number of years to a date attribute. | |
currDate(utc) | Returns the current date according to local or UTC settings. | |
currDatetime(utc) | Returns the current datetime according to local or UTC settings. | |
date(year, month, day) | Returns a column with all values equal to the date consisting of given year, month and day. This description is valid only when the formula is filled with the year mandatory parameter and at least one optional parameter. | |
datetime(date, time) | Returns in each row of the result the datetime value obtained by the composition of the date value contained in the date entry and the time value contained in the time entry. | |
day(date) | Returns the day value of date. | |
hour(time) | Returns the hour value of time. | |
isDate(string, binary) | Checks whether the data type of the attribute specified in the string parameter is date. | |
isDatetime(string, binary) | Checks whether the data type of the attribute specified in the string parameter is date. | |
isMonth(string, binary) | Checks whether the data type of the attribute specified in the string parameter is month. | |
isQuarter(string, binary) | Checks whether the data type of the attribute specified in the string parameter is quarter. | |
isTime(string, binary) | Checks whether the data type of the attribute specified in the string parameter is time. | |
isWeek(string, binary) | Checks whether the data type of the attribute specified in the string parameter is week. | |
minute(time) | Returns the minute value of time. | |
month(date, extract) | Returns the month value of date. | |
quarter(date, extract) | Returns the quarter value of date. If extract is True, it tries to cast variable date to quarter. | |
second(time) | Returns the seconds (values) of the time values. | |
time(hour, minute, second) | Composes a time starting from hours, minutes and seconds. | |
timeZone() | Returns the current timezone, i.e. the difference between local time and UTC time. The resulting type is time. | |
week(date, extract) | Returns the week integer value of an attribute containing a value which can reconduct to a date. | |
weekDay(date, mondaystart) | Returns the day of the week as an integer for each value of date. | |
year(date) | Returns the year value of an attribute containing a date. |
Parameters in bold are mandatory.