Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Doubt in Formating ,,, and need of FM for date calulating

Former Member
0 Kudos

Hi Friends,

i have questions

1. in one case i have to find the date which is some XYZ days past of present date, for example todays date is 03.11.2007 i want to know which date is 100days back,,, is there any FM avaliable ,,,,

2. in another case i want the diffrence of no. of days btw any two dates

ex: no.of days between 25.10.2007 to 25.11.2009

3. how to convert date format from yyyymmdd to mmddyyyy

can any one help me out

Regards

Mukesh Kumar M.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

For your first question use FM FWTR_DATE_RULE_SHIFT_DAYS.

Thanks,

Sriram Ponna.

3 REPLIES 3

Former Member
0 Kudos

Hi,

For your 3rd question can you FM CONVERT_DATE_TO_EXTERNAL or CONVERSION_EXIT_PDATE_OUTPUT.

For your 2nd question no. of days between two dates you can use FM HR_SGPBS_YRS_MTHS_DAYS.

Thanks,

Sriram Ponna.

Former Member
0 Kudos

Hi,

For your first question use FM FWTR_DATE_RULE_SHIFT_DAYS.

Thanks,

Sriram Ponna.

Former Member
0 Kudos

Hi ,

for first question, you can do like this.

date: pre_date type sy-datum,

pre_date = sy-datum - 100.

Here pre_date is the date which is exactly 100 days previous to sy-datum.

No need of function module