title: Azure table storage querying partitionkey
body: <p>I am using Azure table storage to retrieve data though timestamp filter. I see the execution is very slow as timestamp is not a partition key or row key. I researched on stackoverflow and found that time stamp should be converted to ticks and stored in to Partition key. I did the same and while inserting data I took the below string and inserted tick string to partition key.</p>
  
  <pre><code>string currentDateTimeTick = ConvertDateTimeToTicks(DateTime.Now.ToUniversalTime()).ToString();
  
  public static long ConvertDateTimeToTicks(DateTime dtInput)
  {
      long ticks = 0;
      ticks = dtInput.Ticks;
      return ticks;
  }
  </code></pre>
  
  <p>This is fine till here. But When I am trying to retrieve last 5 days data, I am unable to query the tick against partition key. I am trying to get last 5 days data. What was my mistake in the below code?</p>
  
  <pre><code>int days = 5;
  TableQuery&lt;MyEntity&gt; query = new TableQuery&lt;MyEntity&gt;()
  .Where(TableQuery.GenerateFilterConditionForDate("PartitionKey", QueryComparisons.GreaterThanOrEqual, "0"+DateTimeOffset.Now.AddDays(days).Date.Ticks));
  </code></pre>