Oracle SQL

Print
11
Aug

Calculate minutes between two dates

Written by Richard Weug. Posted in Oracle SQL

Simple question but always a pain in the ass in finding the right solution:


select
  round(
         (to_date('12.08.2014 12:30','dd.mm.yyyy hh24:mi')
           -to_date('12.08.2014 11:30','dd.mm.yyyy hh24:mi')
         ) * 24 * 60
       ,0) as result_in_minutes
from dual;

Original Article:  Tobias Arnhold