title: How to convert time from 24 hour format to 12 hour format using javascript?
body: <p>The function returns the time in 24 hour format.<br></p>
  
  <pre><code>function fomartTimeShow(h) {
      return h &lt; 10 ? "0" + h + ":00" : h + ":00";
  }
  </code></pre>
  
  <p>returns the time in 24 hour format. I want the time to be converted in 12 hour format.<br>
  Anyhelp would be greatly appreciated.<br>
  Thanks.</p>