Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

Convert integer to TIME - response (5) by Harpreet Singh

$
0
0
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

Viewing all articles
Browse latest Browse all 27759

Trending Articles