2

Possible Duplicate:
Calculate difference between 2 date / times in Oracle SQL

so i am creating a database for an airline as part of my university coursework. first time using oracle.

I am trying to calculate the hours between two timestamps.

so something like

v_interval = new.departure_time - v_arrival_time;
v_days = extract (day . v_interval);
v_hours = extract (hours, v_interval) + (v_days * 24);

how do you guys think i should do it?

Community
  • 1
  • 1
pritthish
  • 59
  • 2
  • 7

1 Answers1

-1

Similar question:

More examples:

Community
  • 1
  • 1
JohnB
  • 18,046
  • 16
  • 98
  • 110