>Hi Terry,
>
>Thanks for your code. Your code and the others gave me the same result.
>
>Here is the function that I am using that is giving different result as everyone else. Please help.
>
>
>PARAMETERS d1,d2
>
>if (type("d1")="D" and type("d2")="D")
> wd=0
> for D=0 to d2-d1
> if between(DOW(d1+D),2,6)
> wd=wd+1
> endif
> endfor
> return wd
>else
> return 0
>endif
>
>
>Thanks,
>Sam
I got the same results with your function and WeekDays function by Walter.
=MESSAGEBOX(WeekDays(DATE(2007,1,12),DATE(2007,11,15)))
=MESSAGEBOX(sss(DATE(2007,1,12),DATE(2007,11,15)))
What is your test case?
If it's not broken, fix it until it is.
My Blog