Pchart - Date format

1k Views Asked by At

I want to format a date array in mysql format ("2011-03-01") to "d-m-y" format in Pchart.

I have tried :

$MyData->setAxisDisplay(1,AXIS_FORMAT_TIME,"d-m-y");

But don't change anything.

Thanks a lot.

1

There are 1 best solutions below

0
On

Guess this is a bit too late :) The values in pChart needs to be in unix timestamp, so I suggest using strtotime before feeding the values to pChart. Then your call should work fine.