title: How toConvert minutes into hours in postgresql
body: <p>I'm new in PostgreSQL I need to convert the minute's value in a column into hours and minutes format I have searched in various sources but failed to achive.Some one please help me to achieve this.
  In mean while I try to use to_char() as follows : </p>
  
  <pre><code>UPDATE tablename SET col2 = TO_CHAR(((col1*60 ||`second`))::interval, ‘HH24:MI:SS’) where id = 145;
  </code></pre>
  
  <p>but I get the following error...</p>
  
  <blockquote>
  <pre><code>    column "late_by" is of type timestamp with time zone but expression is of type text
  LINE 2: UPDATE attendance SET late_by = TO_CHAR(((lateby*60 || 'seco...
                                          ^
  HINT:  You will need to rewrite or cast the expression.
  </code></pre>
  </blockquote>