PHP Date Formatting from MySQL Fatched Datetime -
this question has answer here:
- convert 1 date format in php 12 answers
can please help? have searched many website (including stackoverflow) can't find exact answer.
it may easy, need know.
2014-11-21 18:49:55
i need convert to
6:49 pm, 21th november, 2014
can me please?
thanks in advance helping.
this should work you:
$date = "2014-11-21 18:49:55"; echo date('g:i a, ds f y', strtotime($date));
output:
6:49 pm, 21st november 2014
Comments
Post a Comment