title: no viable alternative at character ''
body: <p>I'm getting this error when trying to execute the following. I get my deadline date from a Visualpage which is binded directly to a controller.</p>
  
  <pre><code>QueryException: line 1:322 no viable alternative at character ' '
  </code></pre>
  
  <p>My Query being executed:</p>
  
  <pre><code> Select c.CaseNumber,c.Status,c.ID, Account.Name, Account.Status__c, Account.Type,Account.Location_Type__c,Account.BillingCountry,Contact.Name, Contact.Email FROM Case c where c.BatchNumber__c = 'a0dR0000003dfBbIAI' and c.Deadline_Date__c = 2012-11-16 00:00:00
  </code></pre>
  
  <p>My Code:</p>
  
  <pre><code>  Date deadline = CaseParameter.Deadline_Date__c;
    soql = 'Select c.CaseNumber,c.Status,c.ID, Account.Name, Account.Status__c, Account.Type,Account.Location_Type__c,Account.BillingCountry,Contact.Name, Contact.Email  FROM Case c  where c.BatchNumber__c = \''+batchNumber+'\''; 
    soql+= ' and c.Deadline_Date__c = '+deadline;
  </code></pre>