I have a query which lists out rows from a database. I need to convert the standard SQL date format from Y-m-d H:i:s (2001-03-10 17:16:18) to F j, Y, g:i a (March 10, 2001, 5:16 pm) when echoing out the date.
To convert the date format I have
$sqlDate = $row->updateDate;
$updateDate = $phpDate = strtotime( $sqlDate );
$sqlDate = date( 'F j, Y, g:i a', $phpDate );
then echo out
echo $phpDate;
When $phpDate is echoed out it shows as a string of 10 numbers like this: 1454241452
I am not sure what those numbers are... seconds?
What am I doing wrong within the conversion of strtotime ? Or would my problem lie elswere?
Thank you for your time.