Field Values as Filters

Hi All,

I have a Report Date column with the timestamp “YYYY-MM-DD HH:mm:ss”.
I have data for 2015,2016 and 2017 years of data.

Can I have a Template Filter as “YEAR”, which shouls display the year in it ?

Though I have it in time stamp format, I need only the Year to be extracted and used as filter. Idea behind this is to filter the table or graph year wise.

I have added the field “report Date” in Template section. Now I am getting the values inside the Dropdown as below:

2016-10-01T00:00:00,000Z
2016-11-01T00:00:00:000Z
2017-10-01T00:00:00,000Z
2017-11-01T00:00:00:000Z

But, What I wanted is

2016
2017

Is it something to be done with the Regex ? I have tried
doc[‘field_name’].date.year

But it didnt work. Someone please help me on this.

@torkel @mefraimsson. Sorry for Tagging, But didn’t get any help from this community.

I think that, you can’t use time range filter in a template query.