Oracle query to Exclude weekends, and 6PM to 9PM
问题 I am trying to achieve a query that returns the time difference between two dates excluding weekends(Saturday and Sunday) and excluding time (6 pm-9 am). For now, I have a function that is excluding the weekends, But I am unable to exclude time from the query. Can anyone help with this? The article from which I take help is this CREATE OR REPLACE FUNCTION get_bus_minutes_between( p_start_date DATE, p_end_date DATE ) RETURN NUMBER DETERMINISTIC -- ***** Can't hurt IS days_diff NUMBER := 0; end