DATE_DAYOFWEEK

Source

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

Argument Type Description
date DateTime Source datetime.

Returns Int Return number of the weekday.


DATE_YEAR

Source

DateYear returns the year extracted from the given date.

Argument Type Description
date DateTime Source datetime.

Returns Int A year number.


DATE_MILLISECOND

Source

DateMillisecond returns the millisecond of date as a number.

Argument Type Description
date DateTime Source datetime.

Returns Int A millisecond number.


DATE_DIFF

Source

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

Argument Type Description
date1 DateTime First datetime.
date2 DateTime Second datetime.
unit String Time unit to return the difference in.
asFloat Boolean, optional If true amount of unit will be as float.

Returns Int, Float Difference between date1 and date2.


DATE_HOUR

Source

DateHour returns the hour of date as a number.

Argument Type Description
date DateTime Source datetime.

Returns Int A hour number.


DATE_SECOND

Source

DateSecond returns the second of date as a number.

Argument Type Description
date DateTime Source datetime.

Returns Int A second number.


DateCompare

Source

DateCompare check if two partial dates match.

Argument Type Description
date1, date2 DateTime Comparable dates.
unitRangeStart String Unit to start from.
unitRangeEnd String, Optional Unit to end with. error will be returned if unitrangestart unit less that unitrangeend.

Returns Boolean True if the dates match, else false.


DATE_ADD

Source

DateAdd add amount given in unit to date.

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

Returns DateTime Calculated 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


DATE_SUBTRACT

Source

DateSubtract subtract amount given in unit to date.

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

Returns DateTime Calculated 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


DATE_FORMAT

Source

DateFormat format date according to the given format string.

Argument Type Description
date DateTime Source datetime object.

Returns String Formatted date.


DATE_MONTH

Source

DateMonth returns the month of date as a number.

Argument Type Description
date DateTime Source datetime.

Returns Int A month number.


DATE_MINUTE

Source

DateMinute returns the minute of date as a number.

Argument Type Description
date DateTime Source datetime.

Returns Int A minute number.


DATE_DAYS_IN_MONTH

Source

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

Argument Type Description
date DateTime Source datetime.

Returns Int Number of the days.


DATE_DAY

Source

DateDay returns the day of date as a number.

Argument Type Description
date DateTime Source datetime.

Returns Int A day number.


DATE

Source

Date convert RFC3339 date time string to DateTime object.

Argument Type Description
timeString String String in rfc3339 format.

Returns DateTime New datetime object derived from timestring.


DATE_LEAPYEAR

Source

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

Argument Type Description
date DateTime Source datetime.

Returns Boolean Date is in a leap year.


DATE_QUARTER

Source

DateQuarter returns which quarter date belongs to.

Argument Type Description
date DateTime Source datetime.

Returns Int A quarter number.


DATE_DAYOFYEAR

Source

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

Argument Type Description
date DateTime Source datetime.

Returns Int A day of year number.


NOW

Source

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

Argument Type Description

Returns DateTime New datetime object.