Timestamp in descending order

  • What Grafana version and what operating system are you using?
    Windows, grafana-enterprise-8.1.5.windows-amd64.msi

  • What are you trying to achieve?
    A graphical plot from values in DB.

  • How are you trying to achieve it?
    SELECT TOP(1000) dateadd(s, convert(bigint, [Timestamp]- 13*3600), convert(datetime,‘1-1-1970 00:00:00’)) as ‘time’,
    convert(float,Cal0_DesignValue) as Cal0_DesignValue, convert(float,Cal1_DesignValue) as Cal1_DesignValue
    FROM combined
    ORDER BY time desc

  • What happened?
    Time is in descending order. I see in Table or Graphical form the values are all OK, but Graphical form the time on the left side is much later than the time on the right side of plot.

  • What did you expect to happen?
    I need the plot to have the time on the left side to be earlier than the time on the right side.

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    No Errors, but just the plot is wrong, because the time on the left side is later.

1 Like

Hi @tanthiamhuat

Are you sure that this is not just the tooltip hovering over different datapoints?

Can you use the inspect drawer to show what your raw unformatted data looks like?

Solved, thanks, because it is Order BY time desc.

1 Like

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