title: SharePoint REST Api filter on date
body: <p>I am trying to filter out items by date. I want to get one item that has the dateFrom equel or bigger to today and dateTo equel or less then today. This is my query and reformat date function. In SharePoint Online I have the date set to <code>only date</code>. by default sharePoint sets the time part to 23:00:00. Thats why the static use of it. The <code>´ge dateFrom´</code> part of the query works fine but the <code>le dateTo</code> ignores the equel part. So if dateTo is set to <code>2018-03-19</code>. I dont get any items 
   returned with the dateTo set to that date <code>2018-03-19</code>. Is my query wrong?</p>
  
  <pre><code>     var requestUrl = _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists/getbytitle('" + _weaklyQuestion + "')/items?$select=Id,Title,answersOptions,dateFrom,dateTo&amp;$filter=('" + ReFormatTime() + "' ge dateFrom) and ('" + ReFormatTime() + "' le dateTo)&amp;$top=1";
  
          function ReFormatTime() {
          var date = new Date(),
              year = date.getFullYear(),
              month = date.getMonth() + 1,
              dt = date.getDate();
  
          if (dt &lt; 10) {
              dt = '0' + dt;
          }
          if (month &lt; 10) {
              month = '0' + month;
          }
          return year + '-' + month + '-' + dt + 'T23:00:00Z';
      }
  </code></pre>