title: Formatting a time field in SSRS after using DateDiff
body: <p>I have a an expression in SSRS that returns the time difference between 2 date time values (h:m:s). It works, however it is displaying the time with single digits (ie: 1:2:3 instead of 01:02:03. I've tried formatting each section, but SSRS rejects the code. Here is my original code that works producing the single digit time:</p>
  
  <pre><code>=IIf(Fields!IncStatusActionType.Value = "TH",
  DateDiff(DateInterval.Hour,CDATE(Fields!ActivityDate.Value), CDATE(Globals!ExecutionTime)) &amp; ":" &amp;
  DateDiff(DateInterval.Minute,CDATE(Fields!ActivityDate.Value), CDATE(Globals!ExecutionTime)) Mod 60 &amp; ":" &amp;
  DateDiff(DateInterval.Second,CDATE(Fields!ActivityDate.Value), CDATE(Globals!ExecutionTime)) Mod 60, "")
  </code></pre>
  
  <p>I tried using Format just on the hour field to test</p>
  
  <p><code>=IIf(Fields!IncStatusActionType.Value = "TH", Format(DateDiff(DateInterval.Hour,CDATE(Fields!ActivityDate.Value), "HH")</code>, rest of expression....</p>
  
  <p>But it doesn't work. I also tried formatting as "##" and "0#" with no luck.</p>
  
  <p>Any suggestion would be appreciated.</p>
  
  <p>Thanks </p>