I have time in format HH:MM and date in format mm/dd/yyyy. I want COL1 with time formated as HH:MM:SS and COL2 a combination of COL1 and date in format MM/DD/YYYY HH:MM:SS.
Also, then I need to subtract COL3 (format mm/dd/yyy hh:mm:ss) from COL2.
How can I do this?
Something like will help you I think..
selectcast('09:26'||':00' as time) as col1, CAST( current_date AS TIMESTAMP(0)) + (col1 - TIME '00:00:00' HOUR TO SECOND) as col2,(current_timestamp - col2) DAY(4) TO SECOND as col3;