title: Failing to query or scan DynamoDb by date
body: <p>I have a table consisting of some records, and a <code>created_on</code> column which is a date (stored as milliseconds since epoch, with an <code>N</code> type). </p>
  
  <p>I'd like to be able to query all records which were created before today's date, but I'm having a lot of issues with it.</p>
  
  <p>I tried adding a global secondary index on <code>created_on</code>, and I tried a query with the expression <code>created_on &lt;= :v1</code>. However this gave the error <code>com.amazonaws.AmazonServiceException: Query key condition not supported</code></p>
  
  <p>Some googling led me to believe that I'd need to use scan rather than query, with a filter expression. So I'm now attempting:</p>
  
  <pre><code>Map&lt;String, AttributeValue&gt; args = //build map with key ':v1' and value of date's timestamp here
  
  
  DynamoDBScanExpression q = new DynamoDBScanExpression()
          .withIndexName('created_on-index')
          .withFilterExpression("created_on  &gt; :v1")
          .withExpressionAttributeValues(args);
  
  
  return mapper.scan(type, q);
  </code></pre>
  
  <p>This runs without an error, but returns 0 records. I've verified that the milliseconds it returns are of today's date, and there are 3 records in the table for which the condition should match.</p>
  
  <p>Any ideas?</p>