PHP Date Formatting from MySQL Fatched Datetime -


this question has answer here:

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

Popular posts from this blog

c++ - OpenMP unpredictable overhead -

ruby on rails - RuntimeError: Circular dependency detected while autoloading constant - ActiveAdmin.register Role -

javascript - Wordpress slider, not displayed 100% width -