Problem with specific date format

Hello

I’m using grafana 11.6.0 on Debian
I need a date format with the day to help visualization on a chart.

in grafana.ini I added this

[date_formats]
full_date = dddd DD/MM/YYYY HH:mm:ss

With this I have the format I want on the graph
image

but selecting a date range no longer works on the dashboard

Is there a way to fix this?

If so, can I modify moment.locale() to change the current language? (As shown here Moment.js | Docs)

Thanks in advance

What if you used that format in Standard Format configuration for the panel rather than the global in the ini?

Hello

I can’t find an option to change the panel’s time format. :face_with_peeking_eye:

@po220 Have you experimented with this transformation?

1 Like

image

The query no longer produces data with this transformation

try this jsonata which will get you what you want but then you will have to play with it to see if it works in time series

https://try.jsonata.org/XjjFqygRo


Modify your grafana.ini like this:
[date_formats]
full_date = YYYY-MM-DD HH:mm:ss
if you really need the day, use this safe version that avoids issues:

full_date = DD/MM/YYYY HH:mm:ss

Then in your panel override use custom time format like dddd DD/MM/YYYY HH:mm:ss just for display. This avoids breaking the core time picker then Restart Grafana → go to services and restart the grafana to see changes.

@yosiasz Sorry, but I don’t understand your solution with Jsonata.
My data is continuously collected every 10 seconds; I don’t see myself modifying it.
Furthermore, I don’t understand how a format can be modified at the data source level; a date is a date.

@infofcc3 no problem modifying grafana.ini and restarting the service but I can’t find how to do the panel override

thanks

grafana.ini

[date_formats]
full_date = DD/MM/YYYY HH:mm:ss
default_locale = en

I don’t understand the screenshot

Standard options / unit is an option that changes the unit of the series displayed in ordinate on the chart, not the date on the abscise.

since you did not provide sample json data, had to spin mock data for you and demostrate how you can leverage jsonata to get what you want.

I’m using InfluxDBv2 with this Flux query in panel

from(bucket: "Modbus")
|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
|> filter(fn: (r) => r["_measurement"] == "modbus1")
|> filter(fn: (r) => r["_field"] =~ /_t_U$/)
|> keep(columns: ["_time", "_field", "_value"])
|> aggregateWindow(every: v.windowPeriod, fn: mean, createEmpty: false)
|> yield(name: "mean")

This gives me several curves as a function of time in a Time series panel

I need the date with the day because it is much more practical for data analysis. But in reality it’s more practical everywhere ; in panels, in the time selector… everywhere.

If a bug prevents choosing the correct format in grafana.ini having this only in my time series panel is fine for me

thanks

ohh, oops sorry! I think I was responding to another thread.