Date & Time

Temporal functions

date(from)

converts from to a date

Parameters
Name Required Type Description

from

Yes

Text | Date and time

Returns

Date

Examples
date("2016‐12‐09") => 2016-12-09

date("2012-12-25") – date("2012-12-24") => P1D

date(year, month, day)

creates a date from year, month, day component values

Parameters
Name Required Type Description

year

Yes

Number

month

Yes

Number

day

Yes

Number

Returns

Date

Examples
date(2012, 12, 25) => 2012-12-25

date(2012, 12, 25) = date("2012-12-25") => true

date and time(date, time, [timezone])

creates a date time from the given date, the given time and the given timezone if provided

Parameters
Name Required Type Description

date

Yes

Date | Date and time

time

Yes

Time

timezone

No

Text

Returns

Date and time

Examples
date and time(2017-11-24, 23:45:00) => 2017-11-24T23:45:00

date and time(date(2017,03,23), time("15:35:05")) => 2017-03-23T15:35:05

date and time(date("2024-12-24"), time("23:59:00"), "Z") => 2024-12-24T23:59:00Z

date and time(date("2024-06-18"), time("11:30:59"), "America/New_York]") => 2024-06-18T11:30:59-04:00@America/New_York

date and time(from)

converts from to a date and time

Parameters
Name Required Type Description

from

Yes

Date and time | Text

Returns

Date and time

Examples
date and time("2017‐11‐24T23:45:00") => 2017-11-24T23:45:00

day of week(date)

returns the day of the week according to the Gregorian calendar enumeration: Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday

Parameters
Name Required Type Description

date

Yes

Date | Date and time

Returns

Text

Examples
day of week(date and time("2019-10-01T12:05:39")) => Sunday

day of week(date("2019-01-31")) => Thursday

day of year(date)

returns the Gregorian number of the day within the year

Parameters
Name Required Type Description

date

Yes

Date | Date and time

Returns

Number

Examples
day of year(date and time("2019-10-01T12:05:39")) => 274

day of year(date("2019-01-31")) => 31

duration(from)

converts from to a days and time or years and months duration

Parameters
Name Required Type Description

from

Yes

duration | Text

Returns

duration

Examples
duration(PT1600H) => P66DT16H a duration of 66 days and 16 hours

duration("P1Y2M") => P1Y2M a duration of 1 year and 2 months

is(value1, value2)

returns true if both values are the same element in the FEEL semantic domain D.

Parameters
Name Required Type Description

value1

Yes

Date | Date and time

value2

Yes

Date | Date and time

Returns

Boolean

Examples
is(date("2012-12-25"), time("23:00:50")) => false

is(date("2012-12-25"), date("2012-12-25")) => true

is(time("23:00:50Z"), time("23:00:50")) => false

is(time("23:00:50Z"), time("23:00:50+00:00")) => true

month of year(date)

returns the month of the year according to the Gregorian calendar enumeration: January, February, March, April, May, June, July, August, September, October, November, December

Parameters
Name Required Type Description

date

Yes

Date | Date and time

Returns

Text

Examples
month of year(date and time("2019-10-01T12:05:39")) => October

month of year(date("2019-01-31")) => January

now()

returns the current date and time

Returns

Date and time

time(from)

converts from to time

Parameters
Name Required Type Description

from

Yes

Text | Date and time

Returns

Time

Examples
time("15:37:00") => 15:37 hours

time(hour, minute, second, [offset])

creates a time from the given component values

Parameters
Name Required Type Description

hour

Yes

Number

minute

Yes

Number

second

Yes

Number

offset

No

days and time duration

Returns

Time

Examples
time(15,37,00, null) => 15:37:00

time(15,37,00,duration("-PT5H") => 15:37:00-05:0

time(15,37,00) => 15:37:00

today()

returns the current date

Returns

Date

week of year(date)

returns the Gregorian number of the week within the year

Parameters
Name Required Type Description

date

Yes

Date | Date and time

Returns

Number

Examples
week of year(date and time("2019-10-01T12:05:39")) => 40

week of year(date("2019-01-31")) => 5

years and months duration(from, to)

returns years and months duration between from and to

Parameters
Name Required Type Description

from

Yes

Date and time

to

Yes

Date and time

Returns

Years and months duration

Examples
years and months duration(date("2015-12-25"),date(2017,11,22)) => P1Y10M a duration of 1 year and 10 months