title: ORA-01840: input value not long enough for date format while using Bind variable
body: <p>I am trying to append a bind variable (:Year) and I am getting the error as "ORA-01840: input value not long enough for date format". </p>
  
  <p>The sql is </p>
  
  <pre><code>Select SUM(CASE WHEN (date_start&lt;= to_date('01/01/'||:Year,'MM/DD/YYYY') and
                       (actual_termination_date is null or  actual_termination_date &gt; to_date('01/01/'||:Year,'MM/DD/YYYY')))
                  THEN 1 ELSE 0 END ) AS CJAN 
  from PER_PERIODS_OF_SERVICE ppp 
  </code></pre>
  
  <p>I have tried using to_char(:Year) but of no use.<br>
  Can you please let me know what is causing the issue ???</p>