My query returns an object with a date field
$obj = ObjectQuery::create()->findPK(11);
var_dump($obj) shows me the date field as yyyy-mm-dd , as in the database$obj->getThedate(); changes the format to mm/dd/yy , which I do not want to do$obj->getThedate("Ymd"); gives me the same format in yyyy-mm-dd database
So, in order to get the data in the same format that they store in the database, I need to set the format when I get this specific date field, for example, the third row.
The problem is that I do not read the date field separately. I take the full $ obj as a whole and turn it into an array using Zend toArray() , so I can not control how toArray() reads the date field. Is there a way to set Propel to delivery in ("Ymd") format by default? Is there something in the prople configuration settings?
source share