Use Grafana built-in time variable to perform a search on Kibana (Discover)

Hi everyone,

I am working on a Time Series panel which displays some data coming from an Elastic Search Datasource.

In addition to Grafana I have a Kibana installation, and I would like to use it in second stance to perform some drill down starting from my Grafana dashboards.

To do so I was working on Data Links, and I wanted to leverage the built-in time variables like: {__from} and {__to} to select the correct time frame. Kibana use this format (from:‘2020-02-04T16:00:00.000Z’,to:‘2020-02-07T13:00:00.000Z’) while Grafana substitute the named variables with epoch time.

My question is: do you have any advise to either get the variables with such format or to convert them?

Thanks a lot,
G.