DATE

Source

DATE converts RFC3339 date time string to DateTime object.

Argument Type Default value Description
time String String in rfc3339 format.

Returns DateTime New datetime object derived from timestring.


DATE_ADD

Source

DATE_ADD adds amount given in unit to date. The following units are available: * y, year, year * m, month, months * w, week, weeks * d, day, days * h, hour, hours * i, minute, minutes * s, second, seconds * f, millisecond, milliseconds

Argument Type Default value Description
date DateTime Source date.
amount Int Amount of units
unit String Unit.

Returns DateTime Calculated date.


DATE_COMPARE

Source

DATE_COMPARE checks if two partial dates match.

Argument Type Default value Description
date1 DateTime First date.
date2 DateTime Second date.
unitRangeStart String Unit to start from.
unitRangeEnd String "millisecond" Unit to end with. error will be returned if unitrangestart unit less that unitrangeend.

Returns Boolean True if the dates match, else false.


DATE_DAY

Source

DATE_DAY returns the day of date as a number.

Argument Type Default value Description
date DateTime Source datetime.

Returns Int A day number.


DATE_DAYOFWEEK

Source

DATE_DAYOFWEEK returns number of the weekday from the date. Sunday is the 0th day of week.

Argument Type Default value Description
date DateTime Source datetime.

Returns Int Number of the weekday.


DATE_DAYOFYEAR

Source

DATE_DAYOFYEAR returns the day of year number of date. The return value range from 1 to 365 (366 in a leap year).

Argument Type Default value Description
date DateTime Source datetime.

Returns Int A day of year number.


DATE_DAYS_IN_MONTH

Source

DATE_DAYS_IN_MONTH returns the number of days in the month of date.

Argument Type Default value Description
date DateTime Source datetime.

Returns Int Number of the days.


DATE_DIFF

Source

DATE_DIFF returns the difference between two dates in given time unit.

Argument Type Default value Description
date1 DateTime First date.
date2 DateTime Second date.
unit String Time unit to return the difference in.
asFloat Boolean False If true amount of unit will be as float.

Returns Int Float Difference between date1 and date2.


DATE_FORMAT

Source

DATE_FORMAT format date according to the given format string.

Argument Type Default value Description
date DateTime Source datetime object.

Returns String Formatted date.


DATE_HOUR

Source

DATE_HOUR returns the hour of date as a number.

Argument Type Default value Description
date DateTime Source datetime.

Returns Int An hour number.


DATE_LEAPYEAR

Source

DATE_LEAPYEAR returns true if date is in a leap year else false.

Argument Type Default value Description
date DateTime Source datetime.

Returns Boolean Date is in a leap year.


DATE_MILLISECOND

Source

DATE_MILLISECOND returns the millisecond of date as a number.

Argument Type Default value Description
date DateTime Source datetime.

Returns Int A millisecond number.


DATE_MINUTE

Source

DATE_MINUTE returns the minute of date as a number.

Argument Type Default value Description
date DateTime Source datetime.

Returns Int A minute number.


DATE_MONTH

Source

DATE_MONTH returns the month of date as a number.

Argument Type Default value Description
date DateTime Source datetime.

Returns Int A month number.


DATE_QUARTER

Source

DATE_QUARTER returns which quarter date belongs to.

Argument Type Default value Description
date DateTime Source datetime.

Returns Int A quarter number.


DATE_SECOND

Source

DATE_SECOND returns the second of date as a number.

Argument Type Default value Description
date DateTime Source datetime.

Returns Int A second number.


DATE_SUBTRACT

Source

DATE_SUBTRACT subtract amount given in unit to date. The following units are available: * y, year, year * m, month, months * w, week, weeks * d, day, days * h, hour, hours * i, minute, minutes * s, second, seconds * f, millisecond, milliseconds

Argument Type Default value Description
date DateTime Source date.
amount Int Amount of units
unit String Unit.

Returns DateTime Calculated date.


DATE_YEAR

Source

DATE_YEAR returns the year extracted from the given date.

Argument Type Default value Description
date DateTime Source datetime.

Returns Int A year number.


NOW

Source

NOW returns new DateTime object with Time equal to time.Now().

Argument Type Default value Description

Returns DateTime New datetime object.