title: postgres time conversion hh:mm:ss.us to hh:mm
body: <p>Using PostgreSQL database for my attendance application.</p>
  
  <p>I have a table with IN and out times (hh:mm:ss.us format). </p>
  
  <p>When I subtract the times (OUT -IN) to calculate the working hours, results are not as expected due to precision.</p>
  
  <p>If IN Time is "22:12:56.09" 
  &amp; OUT TIme is "22:14:06.06" the difference considering only HH:mm should be 00:02 but it actually shows "00:01:09.97"   which becomes "00:01" in excel using only HH:mm.</p>
  
  <p>I am trying to do the time conversion from hh:mm:ss.us to hh:mm (time format) so that I can subtract the time and get the desired output.</p>
  
  <p>I have done similar things in SQL Server but I did not find any function in PostgreSQL. Please advise.</p>