$getYear
Last updated
Last updated
$getYear
operator returns you the year of the date. You can use this in any
<date_like_obj>
The <date_like_obj> expression can be any valid expression as long as it resolves to datetime objects. It can also be a Magical Autocomplete.
true
integer
- The year of the date provided
The above expression returns 2025
Let's say we have declared a variable temp
of type datetime
which has value of 2025-03-20 00:00:00
currently.
The above expression would resolve to a result of 2025