Home forums Using CanvasJS Help with Spline Chart Reply To: Help with Spline Chart

#22092

Vishwas R
Keymaster

@lonster_monster,

To convert PHP date to JavaScript timestamp, first you need to convert PHP date to PHP timestamp using strtotime and then convert PHP timestamp to JavaScript timestamp by multiplying PHP timestamp by 1000.

$phpDate = date("Y-m-d h:i:sa");
$phpTimestamp = strtotime($phpDate);
$javaScriptTimestamp = $phpTimestamp * 1000;


Vishwas R
Team CanvasJS