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 relation

Former Member
0 Likes
453

in simple manner how could i get difference between date in days

exdample: 20/12/1982 - 25/12/1982 in between satrt & end dates if i click duration automatically it has to calculate & display the duration in days give me hint

in simple manner how could i get difference between date in days

exdample: 20/12/1982 - 25/12/1982 in between satrt & end dates if i click duration automatically it has to calculate & display the duration in days give me hint

2 REPLIES 2
Read only

Former Member
0 Likes
431

Hi

It is simple

<b>data: days type i

days = date2 - date1.</b>

Reward points for useful Answers

Regards

Anji

Read only

Former Member
0 Likes
431

Hello

Use this FM


  CLEAR G_F_DIFF.
  CALL FUNCTION 'DAYS_BETWEEN_TWO_DATES'
       EXPORTING
            I_DATUM_BIS             = ENDDATE
            I_DATUM_VON             = STARTDATE
       IMPORTING
            E_TAGE                  = G_F_DIFF
       EXCEPTIONS
            DAYS_METHOD_NOT_DEFINED = 1
            OTHERS                  = 2.

write: g_F_diff

Vasanth