I have a field in my database of the type datetime that gets populated using CURRENT_TIME
when a record is inserted.
it looks like : 2015-01-05 19:07:03
My question is how do I take this when querying the database and format it to a string so I can echo it via php.
my current code:
$testssql="SELECT * FROM LogTest WHERE DriverID = '$userid' AND Complete = '1'";
$testsresult=mysqli_query($conn, $testssql);
while($row = mysqli_fetch_array($testsresult))
{
date('l, F d, Y', strtotime($row['Date']));
}
However this doesnt work neither does just $row['Date']