I have an SQL database table which contains a column which holds data of datetime format. Now, after getting the values of this row, I need to convert the datettime to a readable string, but I'm unable to do this. Here's the code I'm using:
$result = mysqli_query($handle, "SELECT * FROM $dbTable WHERE id=$id");
while($curr = mysqli_fetch_array($result))
{
// CONVERT $curr['datetimefield'] TO STRING
// echo $strong-format-of-datetime;
}
The conversion part is what I'm stuck at. If anybody could help with this, I'd be really grateful.
Thank You.