You must be logged in to post your query.
Home › Forums › Chart Support › MySQL xAxis date format
Tagged: DateTime, JSON, mysql
First of all lovely product.
I use this in combination with MySQL and json My date format is “2014-09-23 23:59:59” in mysql DB i would like to only display the time, but somehow this datetime format is nog recognised, can somebody help me out here?
Regards
Apparently you have to use milliseconds. I’m using strtotime in PHP:
strtotime($x) * 1000-3600000
the 3600000 is because I’m on UTC.
Hi,
CanvasJS Expects the value to be either timeStamp or Date object – strings are not parsed automatically. Hence you can either parse the date at client side or use the time Stamp value.
For displaying the time in axis labels, you can set the valueFormatString property to hh:mm:ss tt.
hh:mm:ss tt
Please take a look at this JSFiddle.
___ Anjali
You must be logged in to reply to this topic. Login/Register