title: Data request for Azure Resource usage api failed
body: <p>Using Resource usage Api to calculate resource consumption cost.
  Sometimes exception occurred as </p>
  
  <blockquote>
    <p>"The data requested has not yet been processed. Please try again in 5
    minutes"</p>
  </blockquote>
  
  <p>Code used:</p>
  
  <pre><code>string usageUrl = String.Format("{0}/{1}/{2}/{3}", "https://management.azure.com","subscriptions", subscriptionId, "providers/Microsoft.Commerce/UsageAggregates?api-version=2015-06-01-preview&amp;reportedstartTime=" + startDate + "T09%3a00%3a00%2b00%3a00&amp;reportedEndTime=" + endDate + "T" + endTime + "%3a00%3a00%2b00%3a00&amp;aggregationGranularity=Hourly&amp;showDetails=true");
  
  HttpWebRequest usageRequest = (HttpWebRequest)WebRequest.Create(usageUrl);
  
  usageRequest.Headers.Add(HttpRequestHeader.Authorization, "Bearer " + accessToken);
  
  usageRequest.ContentType = "application/json";
  
  HttpWebResponse responses = (HttpWebResponse)usageRequest.GetResponse();
  
  Stream receiveStreams = responses.GetResponseStream();
  
  StreamReader readStreams = new StreamReader(receiveStreams, Encoding.UTF8);
  
  var usageResponse = readStreams.ReadToEnd();
  </code></pre>
  
  <blockquote>
    <p>Inputs: </p>
    
    <p>startDate - 2017-01-07,</p>
    
    <p>endDate   - 2017-01-10,</p>
    
    <p>endTime   - 09(hour).</p>
    
    <p>Current UTC date - 2017-01-10(yyyy-MM-dd)</p>
    
    <p>Current UTC time - 09:15:25(hh:mm:ss)</p>
  </blockquote>
  
  <p>No problems with the format. This code works fine if endTime is passed as "08".</p>