Nice catch Mohan. Below is what I can do.
select cast(0145 as char(4)) as num1,
case when char_length( trim(num1))=4 then num1 else '0'||trim(num1) end as numb, substring(numb from 1 for 2)||':'||substring(numb from 3 for 2)||':00' as convertedstring,
cast (convertedstring as time) as goodtimes
↧