Duration functions
duration("P1Y2M10DT12H45M30.25S")
Returns a duration of 1 year, 2 months, 10 days, 12 hours, 45 minutes and 30.25 seconds.
duration.between($date1,$date2)
Returns a duration between two temporal instances.
WITH duration("P1Y2M10DT12H45M") AS d
RETURN d.years, d.months, d.days, d.hours, d.minutes
Returns 1 year, 14 months, 10 days, 12 hours and 765 minutes.
WITH duration("P1Y2M10DT12H45M") AS d
RETURN d.years, d.monthsOfYear, d.days, d.hours, d.minutesOfHour
Returns 1 year, 2 months, 10 days, 12 hours and 45 minutes.
date("2015-01-01") + duration("P1Y1M1D")
Returns a date of 2016-02-02. It is also possible to subtract durations from temporal instances.
duration("PT30S") * 10
Returns a duration of 5 minutes. It is also possible to divide a duration by a number.
Comments