[TYPO3-dev] Re: Date format in Extbase
Philipp SeÃner
philipp.sessner at gmail.com
Fri Feb 17 22:41:55 CET 2017
I had the same problem and found your forum post.
For repositories you can simply say ->format('Y-m-d') to avoid timestamp-conversion:
public function findByDate(\DateTime $date) {
$query = $this->createQuery();
$query->matching($query->equals('date', $date->format('Y-m-d')));
return $query->execute();
}
Hopefully it helps someone else too.
I don't currently know about TYPO3 8, as it then uses Doctrine. Everything might be better then :-)
More information about the TYPO3-dev
mailing list