title: Need help querying database by todays date while ignoring the time
body: <p>I have a grails project that uses hibernate to talk to a postgres db. I'm using the joda time plugin. I've been using their <code>DateTime</code> format <code>2013-01-25 22:28:55</code> to store dates. I need to know when something happened two weeks ago hince the variable <code>deadline</code>. </p>
  
  <pre><code>import org.joda.time.DateTime
  
  Collection&lt;PerformanceReview&gt; outstandingSelfEvaluations(DateTime deadline) {
      Person.executeQuery("select pr from PerformanceReview as pr \
                      inner join pr.performanceReviewStatus as status \
                      where status.name in (:name) \
                      and pr.employeeEvaluation = null \
                      and pr.dateCreated = :deadline",
              [name: ['Open', 'New'], deadline: deadline])
  }
  </code></pre>
  
  <p>main function </p>
  
  <pre><code>def incompleteSelfEvaluations(Integer days) {
      def deadline = LocalDate.now().minusDays(days)
      def performanceEvaluations = outstandingSelfEvaluations(deadline)
  
      performanceEvaluations.each { PerformanceReview pr -&gt;
          sendSelfEvaluationReminderEmail(pr, evaluationDeadline)
      }
  }
  </code></pre>
  
  <p>The only problem is, I don't know how to check for just the date while ignoring the time. </p>
  
  <p><strong>Edit:</strong> added all relevant code and removed an error message that wasn't useful to this particular problem</p>