just use
trimToYears($myDate)
if you need to use it in xpath
year-from-dateTime($myDate)
and to view it as year you should change the properties of date picker
and the final result will be like this
Hi
The following expression will return the year seperately from the date
formatDateTime($date,’yyyy’)
The following documentation will guide you about DateTime functions
https://docs.mendix.com/refguide/parse-and-format-date-function-calls