title: Getting total milliseconds of a timespan in Analytics Query Language
body: <p>I'm trying to render the difference between two dates over time in Application Insights Analytics, but timespan isn't a supported type for the y-axis of a timechart.  </p>
  
  <p>Example query: </p>
  
  <pre><code>customMetrics
  | extend dateDiff = timestamp - (timestamp - 1m) 
  // my second date comes from customDimensions
  | summarize max(dateDiff) by bin(timestamp, 10m)
  | order by timestamp desc
  | render timechart
  </code></pre>
  
  <p>I'd like to transform my dateDiff timespan into an integer representing the number of milliseconds but I can't find anything in their documentation that supports this.  I basically want C#'s TimeSpan.TotalMilliseconds().</p>