Well how is PHP supposed to figure out what the string looks like
it you have four quotes in it?
To PHP, this:
$query = "select DATE_FORMAT(sDate,"%m %d %Y") from status"
looks like
$query = "select DATE_FORMAT(sDate,"
%m %d %Y
") from status"
And that % doesn't make any sence in PHP.
Try using single quotes inside double quotes, or escape the double quotes when you mean them to be really double quotes, and not string delimiters.
$query = "select DATE_FORMAT(sDate,'%m %d %Y') from status"
$query = "select DATE_FORMAT(sDate,\"%m %d %Y\") from status"