I'm connecting to a mssql server database using my linux cpanel server with php & freeTDS, I can connect and pull all the data i need from the DB but when I pull a date from the database its comes through as a different format,
here is my code
$db = mssql_connect($myServer, $myUser, $myPass)
or die("Couldn't connect to SQL Server on $myServer");
$query = "SELECT * FROM Invoices Where ID = '".$id."'";
$result = mssql_query($query);
$invoice_d = mssql_result($result,$i,'invoice_date');
echo $invoice_d;
But this returns as "Jun 16 2017 12:00:00:AM"
In the mssql databse it is saved in the format 2017-06-16, so i'm not sure why its being or where its being converted.
I have tried converting this unsing date_format and strtotime but none will work, i have also edited the local.conf file in the freetds folder but to no avail.
Thanks