CREATE OR REPLACE FUNCTION get_weeks_between (v_start_date IN DATE, v_end_date IN DATE) return number is v_no_weeks number; BEGIN SELECT TRUNC (v_end_date – v_start_date) / 7 INTO v_no_weeks FROM dual; return v_no_weeks; END; /
CREATE OR REPLACE FUNCTION get_weeks_between (v_start_date IN DATE, v_end_date IN DATE) return number is v_no_weeks number; BEGIN SELECT TRUNC (v_end_date – v_start_date) / 7 INTO v_no_weeks FROM dual; return v_no_weeks; END; /