Hi I am trying to get dates after datetime('now)
My query is not checking against the time value.
I have the following dates :
- 2015-09-03 18:00:00
- 2015-09-03 18:00:00
- 2015-09-10 16:30:00
- 2015-09-13 09:00:00
- 2015-09-13 09:00:00
- 2015-09-13 09:00:00
- 2015-09-13 09:00:00
- 2015-09-13 09:00:00
- 2015-09-13 09:00:00
- 2015-09-13 09:00:00
- 2015-09-13 12:05:00
- 2015-09-13 12:05:00
- 2015-09-13 12:25:00
- 2015-09-13 12:25:00
- 2015-09-13 12:25:00
- 2015-09-13 16:30:00
- 2015-09-14 15:10:00
- 2015-09-14 18:20:00
It seems to ignore the time completely
I can get it to return anything after the 14th, i would expect it to return anything where the time is greater than my startdate (2015-09-14 12:40:39)
public function getRemainingKeysForTimeframe($timeframeID){
$startDate = new \DateTime('now');
$queryBuilder = $this->createQueryBuilder('q')
->select('q')
->andWhere('q.timeframeID = :timeframeID')
->andWhere('q.date >= :start')
->setParameter('timeframeID', $timeframeID)
->setParameter('start', $startDate->format('Y-m-d h:i:s'));
return $queryBuilder;
}