Skip to content

Instantly share code, notes, and snippets.

@caefer
Created August 30, 2011 17:18
Show Gist options
  • Select an option

  • Save caefer/1181401 to your computer and use it in GitHub Desktop.

Select an option

Save caefer/1181401 to your computer and use it in GitHub Desktop.
<?php
$from = new \DateTime('today');
$to = new \DateTime('tomorrow');
$products = $dm->createQueryBuilder('MyBundle:Product')
->field('created_at')->range($from, $to)
->getQuery()
->execute();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment