When using CONVERT(VARCHAR(10),datetime,111) in my SQL query and outputting to php I get the date back in the following format.
2015\/08\/03
Is there a reason why there are the additional slashes?
My php code:
<?php
$sql = "SELECT id, custcode, title, description, CONVERT(VARCHAR(10),datetime,111) as 'date', status
FROM dbo.calls";
$stmt=sqlsrv_query($conn, $sql);
// Initializes a container array for all of the calendar events
$jsonArray = array();
while($row = sqlsrv_fetch_array($stmt)) {
// Stores each database record to an array
$buildjson = array('title' => $row['custcode'], 'start' => $row['date'], 'allday' => false);
// Adds each array into the container array
array_push($jsonArray, $buildjson);
}
// Output the json formatted data so that the jQuery call can read it
echo json_encode($jsonArray);
?>
thanks