I early had problems with formatting the time, but now having problem with showing the google chart visualiszation out of this error: All series on a given axis must be of the same data type.
This is the goal, with date and time: http://jsbin.com/yaqew/1/edit
As I have been notified the google chart constructor will not accept the time/date string: https://developers.google.com/chart/interactive/docs/reference#dataparam
Database:

PHP:
'Time', 'type' => 'datetime'), array('label' => 'Date', 'type' => 'datetime'), array('label' => 'PH', 'type' => 'number'), array('label' => 'temperature','type' => 'number'), array('label' => 'Chlorine','type' => 'number'), ); $rows = array(); while($r = mysql_fetch_assoc($sth)) { // assumes dates are in the format "yyyy-MM-dd" $dateString = $r['Date']; $dateArray = explode('-', $dateString); $year = $dateArray[0]; $month = $dateArray[1] - 1; // subtract 1 to convert to javascript's 0-indexed months $day = $dateArray[2]; echo $dateString."
"; // assumes time is in the format "hh:mm:ss" $timeString = $r['Time']; $timeArray = explode(':', $timeString); $hours = $timeArray[0]; $minutes = $timeArray[1]; $seconds = $timeArray[2]; echo $timeString; $temp = array(); $temp[] = array('v' => "Date($year, $month, $day, $hours, $minutes, $seconds)"); $temp[] = array('v' => (string) $r['PH']); $temp[] = array('v' => (string) $r['temperature']); $temp[] = array('v' => (string) $r['Chlorine']); $rows[] = array('c' => $temp); } $table['rows'] = $rows; $jsonTable = json_encode($table); /* echo $jsonTable; */ ?>
Html/Javascript: