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 Format

Former Member
0 Likes
666

Hi,

I want the date format in

96/01/31 (yy/month/date) and 96 01 31.

That is year should be less than sy-datum for 11 years.

Thanks,

Anitha

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
619

Hi,

Use the below FM:

RP_CALC_DATE_IN_INTERVAL

pass the follwing parameters:

DATE 13.06.2007

DAYS 00

MONTHS 00

SIGNUM -

YEARS 11

then Execute the fM.

After this u can use Offset to change to ur format.yy/mm/dd

Revrt back if any issues.

Reward with poinst if helpful,

Regards,

Naveen

Message was edited by:

Naveen Deva

4 REPLIES 4
Read only

Former Member
0 Likes
620

Hi,

Use the below FM:

RP_CALC_DATE_IN_INTERVAL

pass the follwing parameters:

DATE 13.06.2007

DAYS 00

MONTHS 00

SIGNUM -

YEARS 11

then Execute the fM.

After this u can use Offset to change to ur format.yy/mm/dd

Revrt back if any issues.

Reward with poinst if helpful,

Regards,

Naveen

Message was edited by:

Naveen Deva

Read only

anversha_s
Active Contributor
0 Likes
619

hi,

use this FM.

data : wa_date type sy-datum.
 
call function 'RP_CALC_DATE_IN_INTERVAL'
exporting
date = sy-datum
days = 0 --------------------> give ur required date
months = 0 --------------------> give ur required month
years = 11 --------------------> give ur required years
signum = '-'
importing
calc_date = wa_date.
 
write :/ wa_date. -> new minised date
 
*Note
*signum = '+' " 
*signum = '-' "

Rgds

Anversha

Read only

Former Member
0 Likes
619

Hi,

data p type sy-datum..

data g type char10.

p = sy-datum.

write:/ p.

p0(4) = p0(4) - 11.

concatenate p2(2) p4(2) p+6(2) into g SEPARATED BY '/'.

write:/ g.

regards,

venkatesh

Read only

Former Member
0 Likes
619

Hi,

use the FM 'RP_CALC_DATE_IN_INTERVAL'

Regards