sqlopenedgeprogress-db

How to convert an integer (time) to HH:MM:SS::00 in Progress SQL


I need to create a SQL script to convert a integer field to varchar. My database is a Progress DB. This integer field (nrHoraRegistro) has a timestamp converted in integer.

enter image description here

Is there a way to write a query to convert it in Progress SQL ?

Kind Regards, Juliano


Solution

  • Based on an answer I have given before:

    select
       to_char( 
          timestampadd( 
             sql_tsi_second, 
             nrHoraRegistro,
             curdate() 
          ),
          'hh24:mi:ss' 
       )
    from
       pub.testtable