Application Development and Automation 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: 
Read only

date calculation

Former Member
0 Likes
894

hi all,

please send my any sample report which contains the calcuation

between two dates.

regards

suprith

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
864

hi,

what type of calculation do you want exactly?

Regards

Mohammed

9 REPLIES 9
Read only

Former Member
0 Likes
864

hiii

use FM DAYS_BETWEEN_TWO_DATES aslo refer to following link

regards

twinkal

Read only

Former Member
0 Likes
864

Hi,

Check this

w_date =  w_date1 - w_date2.
w_date =  w_date1 + w_date2.

Regards

Adil

Read only

Former Member
0 Likes
864

Hi,

Check out this sample code.


REPORT z_sdn.

PARAMETERS:
  p_dat TYPE sy-datum.

 INITIALIZATION.
   p_dat = sy-datum + 7.

 START-OF-SELECTION.
   p_dat = p_dat + 3.

 WRITE:
   p_dat.

Regards

Abhijeet

Read only

Former Member
0 Likes
864

Hi,

Refer the following program,it will help you.

DATA : DATE1 LIKE SY-DATUM,

DATE2 LIKE SY-DATUM,

DAYS1 TYPE I.

DATE1 = '01012005'.

DATE2 = SY-DATUM.

CALL FUNCTION 'HR_99S_INTERVAL_BETWEEN_DATES'

EXPORTING

BEGDA = DATE1

endda = DATE2

IMPORTING

DAYS = DAYS1

WEEKS = WEEKS1

MONTHS = MONTHS1

YEARS = YEARS1.

write : days1.

Hope it is helps.

Regards,

T.Durai murugan.

Read only

Former Member
0 Likes
865

hi,

what type of calculation do you want exactly?

Regards

Mohammed

Read only

0 Likes
864

hi

i'm having two tables ekko-bedat and eban-bedat

i've to calcultate the difference between two dates.

please help me out

Read only

0 Likes
864

did you try anything on your own? what was the result?

difference_in_days = ekko-bedat - eban-bedat.

Read only

Former Member
0 Likes
864

hi,

Try using

HR_99S_INTERVAL_BETWEEN_DATES

Read only

Former Member
0 Likes
864

Hi,

Please use the following FMs

In Days

DAYS_BETWEEN_TWO_DATES

In Months

MONTHS_BETWEEN_TWO_DATES

Thanks,

Sriram Ponna.