title: Microsoft Graph CSharp SDK and Filtering - How to construct a request to filter on two different dates?
body: <p>I am coding against the <code>Microsoft Graph CSharp SDK</code> and I am working on proofing out the ability to filter an <code>IDriveSearchCollectionPage</code> object between two different dates. </p>
  
  <p>My request looks like:</p>
  
  <p><code>await graphServiceClient.Drives["test@test.onmicrosoft.com"].Search(searchQuery).Request().Filter(...).GetAsync();</code></p>
  
  <p>I noticed that there is a <code>.Filter()</code> method that lives on <code>IDriveSearchRequest</code> but it only accepts one argument of type <code>string</code>. I took a look at the Microsoft Docs, <a href="https://dev.onedrive.com/odata/filtering.htm" rel="nofollow noreferrer">Filtering Docs</a>.</p>
  
  <p>After reading the docs, I am still having trouble constructing a <code>.Filter()</code> which takes in a date and compares it with a <code>DateTime.Now</code> object.</p>
  
  <p>Here is my current request: </p>
  
  <p><code>await graphServiceClient.Drives["test@test.onmicrosoft.com"]
                      .Search(searchQuery)
                      .Request()
                      .Filter($"02-15-2017 lt {DateTime.Now.ToString("MM-dd-yyyy")}")
                      .GetAsync();</code></p>
  
  <p>When I execute this request I get <code>Bad Request</code> error. Can anyone give me a hand with a .<code>Filter()</code> where I am just trying to compare two dates?</p>