grafana/google-sheets-datasource

Issue with Date & Time format when the locale isn't US

annelaurefroment opened this issue · 5 comments

What happened
When the Locale isn't the US, (it's the UK in this example) and the date format is the default dd/MM/yyyy HH:mm:ss, the day and month get switched in Grafana
This is what I have in my spreadsheet:
image

And this is what I get in Grafana
image

And when the day is above 12 the Date & Time column is empty in Grafana:

Workaround
Changing the date format to yyyy-MM-dd HH:mm:ss in the spreadsheet seems to solve the problem.

What was expected to happen
Grafana respects the locale set in the spreadsheet and gets the date correctly without having to set a custom date format.

Versions
Grafana 7.4.5
Google Sheets plugin 1.0.0

I think it is a duplicate of this closed issue #67

Any solution?

Hey team, this issue is still present. Any plans on a fix for it? Thank you!

I added this to our board but I think the workaround should still work.

I'm on Grafana 9.3.1, Google Sheet plug-in 1.2.0.
I'm on locale France, date interpretation works (2023-01-13 is ok), as long a no time is added (2023-01-13 12:25:00 is not ok). So when adding the time, the date field gets completely blanked out in the inspection panel.
I've tried changing to US locale, no improvement.
I've tried playing with the 'Convert field type' transformation for the date field, it seems simply not to be taken into consideration.
Any idea how I can include the time as well ?

Workaround
Changing the date format to yyyy-MM-dd HH:mm:ss in the spreadsheet seems to solve the problem.

Thank you. I had tried so many permutations to get this to work, but this was the only one that did.

Anyone else: Also add a transform of YYYY-MM-DD HH:mm:ss, and I had to leave the final data point as an "incorrect" value - every single time I formatted the final data point the same as all the other timestamps, parsing failed.