本文介绍了将分钟转换为HH24:MI格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
能帮您将分钟数转换为('HH24:MI')格式吗?
Can you please help in converting minutes to the format of ('HH24:MI').
我得到的结果是整数,即分钟.那么,如何转换它们?
I am getting the result in integer which is the minutes. So, how to convert them?
谢谢
推荐答案
假设您要转换492分钟:
Assuming, you want to convert 492 minutes:
select to_char(trunc(sysdate) + 492/24/60, 'hh24:mi') from dual;
如果您需要功能:
create or replace
function tq84_convert_minutes_hh24mm (p_minutes in number)
return varchar2 is
begin
return to_char (trunc(sysdate) + p_minutes / 24/60, 'hh24:mi');
end tq84_convert_minutes_hh24mm;
/
稍后...
begin
dbms_output.put_line (tq84_convert_minutes_hh24mm(492));
end;
/
这篇关于将分钟转换为HH24:MI格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!