title: Convert time span value to format "hh:mm Am/Pm" using C#
body: <p>I have a value stored in variable of type <code>System.TimeSpan</code> as follows.</p>
  
  <pre><code>System.TimeSpan storedTime = 03:00:00;
  </code></pre>
  
  <p>Can I re-store it in another variable of type <code>String</code> as follows?</p>
  
  <pre><code>String displayValue = "03:00 AM";
  </code></pre>
  
  <p>And if <code>storedTime</code> variable has the value of</p>
  
  <pre><code>storedTime = 16:00:00;
  </code></pre>
  
  <p>then it should be converted to:</p>
  
  <pre><code>String displayValue = "04:00 PM";
  </code></pre>