Home Forums Chart Support MySQL xAxis date format

MySQL xAxis date format

Viewing 3 posts - 1 through 3 (of 3 total)
  • #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?

    Regards

    • This topic was modified 9 years, 6 months ago by FrankGNL.
    #7084

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

    strtotime($x) * 1000-3600000

    the 3600000 is because I’m on UTC.

    • This reply was modified 9 years, 6 months ago by Daniel Silva.
    #7089

    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.

    Please take a look at this JSFiddle.

    Chart with axisx labels in time format

    ___
    Anjali

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

You must be logged in to reply to this topic.