id | fulldate | year | month | day | hour | minute | second | temperature | |||
---|---|---|---|---|---|---|---|---|---|---|---|
2311 | 2013-05-05_11-59-07 | 2013 | 05 | 05 | 11 | 59 | 07 | 16.4 |
options = { xaxes: [{ tickFormatter: xTickFormatter, mode: "time", timezone: "browser" }],
and xTickFormatter looks like this:
function xTickFormatter (val, axis) { var d = new Date(val), h, m; h = d.getHours(); m = d.getMinutes(); m = m < 10 ? "0" + m : m; return [ d.getDate(), " ", months[d.getMonth()], "<br>", h, ":", m ].join(""); }
months[] is an array defined earlier:
months = ["Jan", "Feb" . . . "Nov", "Dec"];
SELECT UNIX_TIMESTAMP(datetime_column) as unix_timestamp FROM table ORDER BY datetime_column DESC.