cancel
Showing results for 
Search instead for 
Did you mean: 

FM: Get Year + Month + Days from Year + Sum of Days

Former Member
0 Kudos

Hi

I'm extracting date from JD Edwards.

Date is e.g. 107045

A, Year is 107 = Year (1900+107 = 2007)

B, Days is 045 = 14.02 (045 days - January 31 days = 14 days in February)

Is there a function module for calculating number of days (B) into month and day (MM.DD)?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

in your case, as you know that 107 is equal to 2007, just create a bit of code like this:

data: l_date type d,

l_year(4) type n,

l_month(2) type n,

l_day(2) type n.

l_year = 1900 + <your jd date>(3).

concatenate l_year '0101' into l_date.

l_date = l_date + <your jd date>+3(3) - 1. "not sure about the -1.

  • now you should have 20070214 in l_date.

  • grab day and month

l_month = l_date+4(2).

l_day = l_date+6(2).

That should be it.

kind regards

Siggi

Answers (1)

Answers (1)

Former Member
0 Kudos

It works fine - Thank you.