1
I’m performing the following capture of a date:
$dtInicial = $this->_getParam('dataInicial'); // Padrão dd/mm/aaaa
To search the bank precisely leave it in the standard yyyy/mm/dd:
$dt1 = date('Y-m-d', strtotime($dtInicial));
But if conducted the research of the day more than today does not work, for example: 25/12/2014 returns "1969-31-12"
And another detail is that I need to do a search between a date and another, I know of the use of between in sql, but using ZF1 I do not know well,
$select = $this->select();
$select->where("data_prazo = ?", $dtInicial);
$select->where("data_prazo = ?", $dtFinal);
Just to say that the code to search between the dates worked like this: $select->Where("data_prazo between '$dtInicial' and '$dtFinal'"); ;)
– phpricardo
I don’t know the purpose, but already thought about using dates with format UNIX_TIMESTAMP
– chambelix