I stumbled on a piece of code, which converts minutes to hours:minutes and appears to work fine.
I was hoping that someone can tell me what the '09' does. It looks to be some sort of format but I couldn't seem to find any references to it.
My goal is to create a function to achieve this task. Thanks in advance to all that answer and for your expertise.
WITH c AS (SELECT 492 AS MINUTES FROM DUAL)
SELECT trim(to_char(trunc(MINUTES / 60), '09')) || ':' ||
trim(to_char(trunc(mod(abs(MINUTES), 60)), '09')) AS HHMM
FROM c;
08:12