hola maestros estoy migrando a postgres y me encontre que la funcion DATEDIFF no esta disponible en postgres.
 
  $this->SQL = "SELECT centro_costo, empresa, f_inicio, f_termino, valor_base, u_tecnica,DATEDIFF(f_termino,CURRENT_DATE) AS diferencia,DATEDIFF(f_inicio,f_termino) as total  FROM h_contratos {SQL_Where} {SQL_OrderBy}";
 
 
 
¿alguien sabe como poder pasarla a postgres?
 
un saludo. 
  
 
