Hi, all...
I want to have one SPL source....
It's about checking week's count with two dates...
etc )
10-07-1999 ~ 10-19-1999 ---> 3 weeks
Please, help me...
↪ replying to Bongsoo chong
Bongsoo chong wrote:
>
> Hi, all...
>
> I want to have one SPL source....
>
> It's about checking week's count with two dates...
>
> etc )
> 10-07-1999 ~ 10-19-1999 ---> 3 weeks
>
> Please, help me...
Use intervals (partial code):
Args: StartDate, EndDate;
DEFINE diff INTERVAL DAY(4) TO DAY,
holder CHAR(5),
weeks INTEGER;
LET diff = EndDate - StartDate;
LET holder = diff {Cannot convert directly from INTERVAL TO INTEGER}
LET weeks = holder
LET weeks = (weeks + 6) / 7; {Assuming, from your example, that you want
to count partial weeks. }
RETURN weeks;
Art S. Kagel