0

I have two rows stored in a table called client_booking. These are called start_time and end_time. I need to create a text box in ORACLE APEX which generates the elapsed time through an SQL query.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
user2151140
  • 15
  • 1
  • 6

1 Answers1

0

Time difference being in days, let us multiply it by no of hours 24 and no of minutes 60. Assuming they are of DATE or TIMESTAMP datatypes

select (
         to_date('01-01-2014 '|| end_time  ||'00','DD-MM-YYYY HHMISS') -
         to_date('01-01-2014 '|| start_time||'00','DD-MM-YYYY HHMISS')
       ) * 24 * 60 as time_elapsed_in_mins
from your_table;
Maheswaran Ravisankar
  • 17,652
  • 6
  • 47
  • 69