我有一个 JD Edwards 表列,其值 170443 代表时间。我想将其格式化为 HH:MI:SS 但我收到错误 ORA-01850: hour must be between 0 and 23. 我需要对以下代码应用哪些更改才能使输出显示为 17: 04:43?
SELECT CASE WHEN LVUPMT= 0 THEN NULL
ELSE
TO_TIMESTAMP(substr(LVUPMT,1,2) ||':'||substr(LVUPMT,3,2) ||':'||substr(LVUPMT,5,2), 'HH24:MI:SS')
END AS DDATE
FROM PRODDTA.F07620 WHERE LVAN8 = 102366;