Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 oracle 查询中转换时间 16:00:00 或 08:00:00 HH12:MI AM 格式
我尝试 TO_CHAR ('16:00:00', 'HH12:MI AM') 但它显示没有 AM / PM 。
TO_CHAR ('16:00:00', 'HH12:MI AM')
请检查
好吧,它工作正常:
select to_char(to_date('16:00:00', 'hh24:mi:ss'), 'hh12:mi am') from dual;
结果是:
04:00 pm
这不是你想要的吗?