-
What Grafana version and what operating system are you using?
8 on Server 2019 -
What are you trying to achieve?
Format datetime in Grafanas new alerting -
How are you trying to achieve it?
On my dashboard I can use ‘${__from:date:YYYY-MM-DD LTS}’ for the format I need which is: e.g. 2021-08-03 06:00:00
The alerting will not use this for some reason.
- What happened?
I get an error as shown below which I know is to do with the date time. If I use an unformatted variable for datetime I think it is returning like 2021-08-03Z06:00:00T which doesn’t work. I am fairly new to SQL so if there is something silly I am not doing I would appreciate the help:
Failed to evaluate queries and expressions: failed to execute conditions: failed to execute query A: db query error: mssql: Conversion failed when converting date and/or time from character string.
- Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
Failed to evaluate queries and expressions: failed to execute conditions: failed to execute query A: db query error: mssql: Conversion failed when converting date and/or time from character string.
I just want to add that on a dashboard this query works fine and returns the data in a stat object.
Thanks in advance.