Extract the year from a date

Please read be patient section at

May be your question is more for Kibana? So may be move it to kibana instead?
I believe you can do something similar with time series visual builder.