I have a php mysql query for a datetime. The result from the query is:
2017-09-04 11:58:26
I use the below and it appears the time is wrong.
$date_time = new DateTime($row['act_date_long']);
$date_time->format('D n/j/Y g:s a')
The result I get is:
Mon 9/4/2017 11:26 am
I need the result to be
Mon 9/4/2017 11:58 pm
What is causing the time difference and how do I format the datetime to my desired format? Thanks!
$date_time->format('D n/j/Y g:i a');it should bei(for minute) instead ofs(for second)