Hi!
I’m trying to get the __from and __to variables in a particular format: YYYY-MM-DD-HHmmss. I also need them to be in UTC timezone. I seem to be able to get either one or the other, but not both.
I can get the format I want like this, but it is converted to my browser/local time (UTC+8:00):
${__to:date:YYYY-MM-DD-HHmmss}
and I can get it in UTC with this, but then the formatting is different:
${__to:date:iso:YYYY-MM-DD-HHmmss}
As shown in this screenshot:
I could write some javascript to get the exact string I want, but is there a way I can do it with just the variables?
-
What Grafana version and what operating system are you using?
docker image: grafana/grafana:latest, running in Windows -
Did you follow any online instructions? If so, what is the URL?
yes - Add and manage variables | Grafana documentation
Thanks!