Home forums Using CanvasJS MySQL xAxis date format

Tagged: , ,

This topic contains 2 replies, has 3 voices, and was last updated by  Anjali 4 years ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #7075


    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?


    • This topic was modified 4 years ago by  FrankGNL.

    Daniel Silva

    Apparently you have to use milliseconds.
    I’m using strtotime in PHP:

    strtotime($x) * 1000-3600000

    the 3600000 is because I’m on UTC.




    CanvasJS Expects the value to be either timeStamp or Date object – stings are not parsed automatically. Hence you can either parse the date at client side or use the time Stamp value.

    For displaying the time you can use the valueFormatString property.

    Here is an example.


Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.