Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Operations with dates

Hi,

I need to sustract 2 dates and obtain the differece of days.

My question is that if I need to do some convertion first or direct sustract the 2 dates and obtain the result in days?

Ex: 02.03.06 - 31.03.06 = 2

Tags:
Former Member
Former Member replied

Hi laura,

1. no need to do anything special.

2. just simply minus.

3. eg.

report abc.

data : d1 type sy-datum,

d2 type sy-datum.

data : diff type i.

d1 = '20060101'.

d2 = '20060331'.

diff = d2 - d1.

write : diff.

regards,

amit m.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question