2009 Feb 20 6:35 AM
Hi Experts,
Actually i want to compare two dates which are in DD/MM/YYYY.
I want to get recent date.
Pls help me.
Thanks,
Madhu.
Hi Experts,
Actually i want to compare two dates which are in DD/MM/YYYY.
I want to get recent date.
Pls help me.
Thanks,
Madhu.
2009 Feb 20 6:41 AM
Hi Madhu,
Kindly go through this link below:
https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/functionModulerelatedonDate+calculations
Hope it helps
Regrds
Mansi
2009 Feb 20 6:48 AM
Just convert date into internal format by using CONVERT_DATE_TO_INTERNAL
and then compare.
2009 Feb 20 6:53 AM
hi,
Use this FM for DATE comparision
HR_HK_DIFF_BT_2_DATES
"or
FIMA_DAYS_AND_MONTHS_AND_YEARS
Thanks
Arun
Edited by: Arun Kayal on Feb 20, 2009 7:53 AM
2009 Feb 20 6:54 AM
hi,
move the date to an integer variable
if the integer is greater then that is your recent date
data:
w_integer1 type i,
w_integer2 type i,
w_date1 type sy-datum,
w_date2 type sy-datum value '12122009'.
w_date1 = sy-datum.
w_integer1 = w_date1.
w_integer2 = w_date2.
if w_integer1 > w_integer2.
write:/ w_date1.
else.
write:/ w_date2.
endif.thanks
sarves
2009 Feb 20 6:54 AM
Hi Madhu..Kindly chk this..
parameters:
p_date1 type d,
p_date2 type d.
write:/ 'Recent date'.
if p_date1 gt p_date2.
write:/ p_date1.
else.
write:/ p_date2.
endif.
Regards,
Mdi.Deeba
2009 Feb 20 6:54 AM
2009 Feb 20 6:56 AM
Hi Madhu,
You just want to get latest date from given two date ...........if so then you have to compare the date above give FM
or you can do one thing you just check
Date 1 > Date2 or Date1< Date 2
-Rick
Edited by: Ricky Maheshwari on Feb 20, 2009 12:27 PM
2009 Feb 20 11:09 AM
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |