title: Converting a Time String to 24hr Time as Time Only
body: <p>How can I convert a string representing 12-hour time into a time-only, 24hr format? Here's my code so far.</p>
  
  <pre><code>string[] ar;
  string s = "7:00 AM - 9:00 AM";
  ar = s.Split('-');
  s = String.Format("{0:HH:mm:ss}", ar[0]);
  </code></pre>