‎2007 Jul 04 1:08 PM
Hi All,
I have a date field date1.
I want to check whether it falls between date2 and date3.
Date2 - Start date
Date3 - End date
Let me know how to do it.
Regards,
SP
‎2007 Jul 04 1:11 PM
Hi Sandeep,
you can directly check that date by comparing with those two dates.
i.e. if dat1 ge dat2 and dat2 le dat3.
< do the process needed>
endif.
<b>Reward points if this solves your problem.</b>
Kiran
‎2007 Jul 04 1:12 PM
data:
w_date1 type sy-datum,
w_date2 type sy-datum,
w_date3 type sy-datum.
w_date1 = '20080101'.
w_date2 = '20050101'.
w_date3 = sy-datum.
if w_date3 lt w_date1 and w_date3 gt w_date2.
write 'Lies in interval'.
else.
write 'Doesnot lie in the interval'.
endif.
Here is the code.
Regards,
Pavan P.
‎2007 Jul 04 1:15 PM
Hi sandeep,
a -
>1st date,
b -
>2nd date,
c -
>3rd date,
if a >b and a<c
write: a.
I fuseful reward points.
‎2007 Jul 04 1:16 PM
‎2007 Jul 04 1:19 PM
Hello,
Try this function module and reward if found help full.
GM_VALIDATE_DATE_RANGE
Regards,
rakesh.
‎2007 Jul 04 1:29 PM
DATA : date1 like syst-datum,
date2 like syst-datum ,
date3 like syst-datum .
IF date1 < date2.
WRITE: / " date is lesser '.
ELSEIF date1 > date2 AND
date1 < date3.
WRITE: / 'date is present in between '
ELSE.
WRITE / 'date is greater '.
ENDIF.
reward points if it is usefull ..
Girish