Home forums Using CanvasJS Date Format Reply To: Date Format

#20966

liyen
Member

Hi Priyanka,

May I know how to put the new Date() into the array?

array_push($dataPoints, array(“x”=> $row->x, “y”=> $row->y));

I tried the below, it is not working:

array_push($dataPoints, array(“x”=> “new Date(\””.$row->x.”\”)”, “y”=> $row->y));

Thanks.