Upmt or tday conversion sql

sbrown

sbrown

Member
I have come up with a way to convert the jde time stamp in sql.

Concat(concat(concat(
case when length(qpupmt)=6 and substr(qpupmt,1,2) between '13' and '24' then to_number(substr(qpupmt,1,2))-12 else
case when length(qpupmt)=6 and substr(qpupmt,1,2) between '10' and '12' then to_number(substr(qpupmt,1,2))else to_number(substr(qpupmt,1,1))end end,':'),
case when length(qpupmt)=6 then to_char(substr(qpupmt,3,2)) else to_char(substr(qpupmt,2,2)) end),
case when length(qpupmt)=6 and substr(qpupmt,1,2) between '12' and '23' then 'pm' else 'am' end) as time
 
ok! Very useful sbrown.

Thanks!

If you want convert upmj and upmt (or tday) to time_stamp, plase share with us.

Regards,
Alfredo.
 
Back
Top