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: 

Date Differnece

Former Member
0 Kudos

Hello Guys!

Can you help me out to find ageing for 30/60. I have date and i want to get the the date difference.

urgernt please

omer

3 REPLIES 3

Former Member
0 Kudos

Hi,

Can you explain in detail, what exactly you are looking for?

What do you mean by ageing for 30/60 and the date difference?

Regards,

Ravi

Former Member
0 Kudos

Hay Omer

check with this code

DATA: ENDETAG LIKE SY-DATUM,

ENDEZEIT LIKE SY-UZEIT.

DATA DATEDIFF TYPE P DECIMALS 7.

DATA TIMEDIFF TYPE P DECIMALS 7.

DATA EARLIEST.

CALL FUNCTION 'SD_DATETIME_DIFFERENCE'

EXPORTING

DATE1 = ENDETAG

TIME1 = ENDEZEIT

DATE2 = SY-DATUM

TIME2 = SY-UZEIT

IMPORTING

DATEDIFF = DATEDIFF

TIMEDIFF = TIMEDIFF

EARLIEST = EARLIEST

EXCEPTIONS

INVALID_DATETIME = 1

OTHERS = 2.

Thanks & regards

Sreenivasulu P

Former Member
0 Kudos

Hi omer,

Use the function module DAYS_BETWEEN_TWO_DATES.

Also try

DURATION_DETERMINE

SD_DATETIME_DIFFERENCE

FIMA_DAYS_AND_MONTHS_AND_YEARS

You can also try this...

data: date1 type sy-datum,

date2 type sy-datum.

data: diff type i.

diff = date1 - date2.

Regards,

Tanveer.

Please mark helpful answers