title: XQuery - Filtering by Date Range
body: <p>I am trying to convert the following SQL Statement to XQuery</p>
  
  <pre><code>SELECT *
  FROM Customers
  WHERE (OrderDate BETWEEN #1997/1/1# and #1998/1/1#)
  </code></pre>
  
  <p>This statement will return all records with an order date between 1/1/1997 and 1/1/1998#</p>
  
  <p>I simpy am unsure of how to write the where statement. As the order date is written like this in the xml file</p>
  
  <pre><code>&lt;OrderDate&gt;1996-07-04T00:00:00&lt;/OrderDate&gt;
  </code></pre>
  
  <p>This is now what I have but still doesn't work</p>
  
  <pre><code>for $x in doc("Orders.xml")/dataroot/Customers
  where //Customers[OrderDate&gt;1997/1/1][OrderDate&lt;1998/1/1]
  
  return $x
  </code></pre>