ok terima kasih banyak ...

saya coba dulu....

regards

widhi

--- ary nur <[EMAIL PROTECTED]> wrote:

> Cara I :
> 
> create table dengan column yang menampung list
> tanggal dan diisikan
> dengan tanggal yang dibutuhkan misal diisikan dari
> list tanggal 2
> tahun kebelakang dan 2 tahun kedepan, atau terserah
> anda.
> 
> CREATE TABLE MYDATE ( 
>   CAL_DATE       DATE          NOT NULL, 
>   CAL_YEAR  NUMBER, 
>   CAL_MONTH NUMBER) ; 
> 
> Query :
> 
> select count(cal_date)
>   from mydate
>  where cal_date between
> to_date('19-06-2005','DD-MM-YYYY') -
>                               and
> to_date('26-05-2005', 'DD-MM-YYYY')
>   and to_char(cal_date, 'Dy') <> 'Sun';
> 
> Cara II :
> 
> declare
> function days_between (p_start_date date, p_end_date
> date) return number
> is
>  v_days number;
>  v_date date;
> begin
>   v_days := 0;
>   v_date := p_start_date;
>   while v_date <= p_end_date loop
>     if to_char(v_date, 'Dy') <> 'Sun' then
>       v_days := v_days + 1;
>     end if;
>     v_date := v_date + 1;
>   end loop;
>   return v_days;
> end;   
> begin
>  
>
dbms_output.put_line(to_char(days_between(trunc(sysdate,
> 'MON'),
> last_day(sysdate))));
> end; 
> 
> -----------------
> arynur
> 
> On 6/22/05, wkus77 <[EMAIL PROTECTED]> wrote:
> > 
> > terima kasih sebelumnya...
> > 
> > masalahnya yang dihitung cuma hari kerja aja
> seperti
> > senin sampai sabtu...
> > gimana yach???
> >
> 



                
__________________________________ 
Yahoo! Mail 
Stay connected, organized, and protected. Take the tour: 
http://tour.mail.yahoo.com/mailtour.html 



--
-----------I.N.D.O - O.R.A.C.L.E---------------
Keluar: [EMAIL PROTECTED]
Website: http://indo-oracle.blogspot.com
-----------------------------------------------

Bergabung dengan Indonesia Thin Client User Groups, 
Terminal Server, Citrix, New Moon Caneveral, di:
http://indo-thin.vze.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/indo-oracle/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Kirim email ke