arnoldssss arnoldssss - 1 year ago 64
PHP Question

Convert a date into a date with day of the week php native

Basically I want to convert this date : 2016/12/18
to : Sunday, December 18, 2016.

I'm using zend framework and php 5.4

I'm really new with this I tried to use:

date( "Y/m/d", strtotime( $model->startDate))->toString(Zend_Date::DATE_FULL) ;

but brings:
Call to a member function toString() on a non-object
Any idea? It's possible to make this on php native?

Answer Source

  $x = "2016/12/18";

  echo date( "l, F d, Y", strtotime($x)); 


Will return:

Sunday, December 18, 2016


Check here for date parameters:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download