title: SQL String in VBA in Excel 2010 with Dates
body: <p>I've had a look around but cannot find the issue with this SQL Statement:</p>
  
  <pre><code>    strSQL = "SELECT Directory.DisplayName, Department.DisplayName, Call.CallDate, Call.Extension, Call.Duration, Call.CallType, Call.SubType FROM (((Department INNER JOIN Directory ON Department.DepartmentID = Directory.DepartmentID) INNER JOIN Extension ON (Department.DepartmentID = Extension.DepartmentID) AND (Directory.ExtensionID = Extension.ExtensionID)) INNER JOIN Site ON Extension.SiteCode = Site.SiteCode) INNER JOIN Call ON Directory.DirectoryID = Call.DirectoryID WHERE (Call.CallDate)&gt;=27/11/2012"
  </code></pre>
  
  <p>Regardless of what I change the WHERE it always returns every single value in the database (atleast I assume it does since excel completely hangs when I attempt this) this SQL statement works perfectly fine in Access (if dates have # # around them). Any idea how to fix this, currently trying to create a SQL statement that allows user input on different dates, but have to get over the this random hurdle first.</p>
  
  <p><strong>EDIT</strong>: The date field in the SQL Database is a DD/MM/YY HH:MM:SS format, and this query is done in VBA - EXCEL 2010.<br>
  Also to avoid confusion have removed TOP 10 from the statement, that was to stop excel from retrieving every single row in the database.<br>
  Current Reference I have activated is: MicrosoftX Data Objects 2.8 Library<br>
  Database is a MSSQL, using the connection string:<br>
    Provider=SQLOLEDB;Server=#######;Database=#######;User ID=########;Password=########;</p>