SQL data and nanoseconds

Hello,

I’m fairly new to grafana and mySQL but I’ve got a question google can’t answer and my knowledge of mySQL is far from it to solve.

Problem: I’ve got a logging soft (DCS system) that writes it’s data to a SQL database in the following format:
2021-06-14_21-22-30_cut

I managed to receive the data from the server, but only in the seconds format. There’s a seperate colum containing the nanoseconds (data per 100ms).

Question: is there any possibillity to add the nanoseconds (milliseconds) to the time and display all the data?

Thanks for the support!

Hello,
after a lot of trying and further reading I came myself to the following (working) solution:

SELECT
UNIX_TIMESTAMP(DATE_ADD(time, INTERVAL ntime/‘1000’ MICROSECOND)) AS “time”,
value
FROM O000_001_001_007_00000017__5
WHERE
$__timeFilter(time)
ORDER BY time

Now lets work on the precision of the data (float)

Hi @jeroen4ds by this, do you mean the precision of how the data gets rendered in the Grafana UI? This might be a JS limitation…

This topic was automatically closed after 365 days. New replies are no longer allowed.