Overview
The year()
function extracts the year from a time value.
Syntax
year(time)
Augment |
Type |
Description |
---|---|---|
time |
Datetime, timestamp, string | The time value |
Return type: Integer
Example of Result
return year("2022-10-5")
Result: 2022
Example of Use
Retrieve reviews posted in 2018.
find().nodes({year(@review.time) == 2018}) as n
return n{*}