Graphing using Time from SQL


Andreschrosa

Recommended Posts

OK, I managed to set the time of the result from SQL query like this:

for(i = 0, i < numrows(data), i++)
   for(j = 0, j < numrows(result.thetime, j++)
	  Execute("Result." + data[i] + ".time[" + j + "] = result.TheTime[" + j + "]")
   endfor
endfor

However, even when I add those as traces to the graph, time is still in seconds from 1970 notation.. how do you make those display as hours?

Link to comment
Share on other sites

You can't specify formatting in the trace expression. You just end up a string which can't really be plotted.

Your second solution of putting time into the actual result is a better choice. The X Expression then becomes Time. But once a graph gets set on outputting the X axis in seconds since 1970 notation, its hard to get it formatted back. Your best bet is to either duplicate the graph, or better yet, create a new one.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.