I am having some trouble getting a date field out of my SQLServer using PHP and have not been able to Google a solution. I know that it involves the fact that the field is a date data type in my table, but the only results I get is a 500-Internal Server Error.
Here is what I have:
$query = "SELECT EntryDate FROM Table1 WHERE UserID = 1";
$result = sqlsrv_query($link, $query);
while($row = sqlsrv_fetch_array($result))
{
echo $row['EntryDate'];
}
This works with every other column in my table except the date column. Any idea why?
BTW, the date in my table is formatted as yyyy-mm-dd.
500response?