Thanks for your reply.
Sorry for the two identical token name, this was a typo and I have corrected it.
If there are three or more years, I want to find the earliest year and the latest year, and use the date as tokens. (I just want to find the smallest time range that covers all those years.) And I want to use the tokens for time range of searches in dashboard. Like this:
<search>
<query>| index=abc</query>
<earliest>$timeRangeEarliest$</earliest>
<latest>$timeRangeLastet$</latest>
</search>
... View more