Search code examples
sqloracledate-arithmetic

Oracle database: getting time from total amount of minutes from the beginning of a day


Given - number of minutes (number oracle type) from the beginning of a day, e.g. 480. Need to get standard oracle time, e.g. - 08:00:00 AM. Is there any good functions to do such operation?


Solution

  • Just add minutes/1440 to the date, e.g.

    select to_date('1.1.2015','dd.mm.yyyy')+480/1440 from dual;