var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: DATEDIFF Function, Need to exlude Weekends
Is there an Oracle function that I can use to find out the number of days between current date and another date? I would like to exclude Weekends and holidays, is this possible?
Will DateDiff work or some other function within Oracle? Can anyone show me an example?
In Oracle, you'd subtract two dates to get number of days between them.
Excluding weekends? OK, could be done. But, excluding
SQL> select to_date('20.03.2007', 'dd.mm.yyyy') - -
> to_date('10.03.2007', 'dd.mm.yyyy') date_diff
2 from dual;
holidays? How does your Oracle version know which holidays are there in your country? It surely doesn't know my holidays. I guess you'll have to create your own function to do that.
Yes I used this: TRUNC(CURRENT_DATE - datefield) AS NO_OF_DAYS. Now do you have an example of excluding the weekends? That is all I need now but in the future they want excluding holidays.
You do not need a parachute to skydive. You only need a parachute to skydive twice.