title: How to query google app engine blobstore by creation date and order the results
body: <p>I need to retrieve the latest set of files from GAE blobstore. Currently my code says</p>
  
  <pre><code>nDays = 10 #this is set at run time
  gqlQuery = blobstore.BlobInfo.gql("WHERE filename = :1 ORDER BY creation DESC",&lt;filename&gt;)
  cursor = gqlQuery.fetch(nDays)
  </code></pre>
  
  <p>when I iterate and print out the data by calling cursor[i].creation, it doesn't give me the last nDays starting from today. For example, today is August 20. I expect it to give me data from Aug 11 - Aug 20 (I have a file for each day). Instead it gives me data from Aug 13 back a few days.</p>
  
  <p>If i remove the ORDER BY in the gqlquery, it correctly returns all the results (not sorted).
  If I make the gqlQuery iterable so that I say something like</p>
  
  <pre><code>for filename in gqlQuery:
      print filename.creation
  </code></pre>
  
  <p>it only prints from August 13 back to a few days (about 8 days). I know for a fact there is data up till today. From GAE, I can view the data. Also, the creation date is stamped automatically by Google when the file is uploaded to blobstore.</p>
  
  <p>Anyone know what I'm missing?</p>