title: JavaScript -- slice time string to return HH:MM
body: <p>I have a time/date string that is returned like so:</p>
  
  <p><code>"5/31/2016, 2:23:33 PM"</code>. I need only the HH:MM and am/pm, so <code>2:23 PM</code></p>
  
  <p>I am able to split the date off but not sure how I can remove the colon and seconds.</p>
  
  <pre><code>time = time.split(",")[0]; 
  //time = " 2:23:33 PM";
  </code></pre>
  
  <p>thanks</p>