How to correctly perform a JdbcQuery that have a date as where condition?
<p>I am working on a Spring application using <strong>JdbcTemplate</strong> and I have the following doubt:</p>

<p>I have to implement a method that perform the following simple query:</p>

<pre><code>select * from CoefficienteRendimento 
where DataRendimento = '2015-08-01 00:00:00'
</code></pre>

<p>where the value of the <strong>DataRendimento</strong> field can change.</p>

<p>So I am doing something like this:</p>

<pre><code>public BigDecimal getRendimentoLordoCertificato(XXX) {

    String sql = "select * from CoefficienteRendimento where DataRendimento =  ?";

    .......................................................................
    .......................................................................
    .......................................................................


}
</code></pre>

<p>So my doubt is:</p>

<p>for this sitatuon is better to pass as <strong>XXX</strong> parameter (that have to be used inside the query) a String value as <strong>'2015-08-01 00:00:00'</strong> or a <strong>Date</strong> object representing this date?</p>