APEXblog.nl - Tips and Tricks

About This Blog:
I (Richard Weug) started this blog primary for myself to save all kinds of Apex tips and tricks in one place. To use it as a place to write down how I used some coding in my own projects, but also to copy and paste all kinds of articles I find on the Internet. (So I never have to wonder on what website did I read about??? When I see something interesting I collect the content so I have my own archive/knowlegde base.

View my profile on LinkedIn

 

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