1

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? Thanks!

arnoldssss
  • 468
  • 3
  • 9
  • 22

2 Answers2

2
<?php 

  $x = "2016/12/18";

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

?>

Will return:

Sunday, December 18, 2016

---

Check here for date parameters:

http://php.net/manual/en/function.date.php

Irvin
  • 830
  • 5
  • 13
1

Use this one

echo date('l F d,m',strtotime('2016/12/18'))
Basant Rules
  • 785
  • 11
  • 8