The date & time of datetime/timestamp columns not being read correctly

  • What Grafana version and what operating system are you using?
    9.1.3

  • What are you trying to achieve?
    Trying to plot a time series chart from a table in the Vertica database

  • How are you trying to achieve it?
    by including the time series column (timestamp_tz) and a metric column (CPU utilization)

  • What happened?
    the timestamp of the time series column is transformed to a constant time of “31-Aug-1754 04:37:09.129”, irrespective of what the date-time in the time series column in the datasource.

  • What did you expect to happen?
    Show the same timestamp as in the datasource

  • Can you copy/paste the configuration(s) that you are having problems with?
    Here is a snapshot of the data from my database using the query “SELECT timestamp_tz, cpu_util_pct_avg FROM opsb_sysinfra_node_1h ORDER BY cpu_util_pct_avg”:
    image

And see the snapshot from Grafana explore using the query: “SELECT timestamp_tz, cpu_util_pct_avg FROM opsb_sysinfra_node_1h ORDER BY cpu_util_pct_avg”

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    No related errors in the log file

  • Did you follow any online instructions? If so, what is the URL?

Hello
Look like it’s working , but your date is 250 years ago…
can you convert this to unix timestamp ? are your in time series mode in the panel ?
i think you have to rename the time fields with an alias named time too,
I believe it’s close to mysql usage.
may you can check this link :

Thanks @alexandrearmand. My date in the database is current, see the output of the query from my database in the first screenshot I posted.

In the meantime I resolved the issue by using the Vertica function to_timestamp_tz(<epoch in seconds>). Interestingly, the Vertica function to_timestamp(<epoch in seconds>) too doesn’t work and gives the same date from 1784.

But this is a workaround, and I would still like to understand why I am not able to directly use a datetime field as is.

Thanks
-Ankit