Iam having date with format "2016-07-20 08:01:49". But I want only date with month as name like this
July 20, 2016
Iam having date with format "2016-07-20 08:01:49". But I want only date with month as name like this
July 20, 2016
Yes you can use date()
method like this:
date('M d, Y', strtotime('2016-07-20 08:01:49'));
// Output - July 20, 2016
See more about date formats in PHP
Hope this helps!