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 printing using date mask

Former Member
0 Kudos

Hi,

Iam using Date mask to print the date in 96/01/10 (year/month/Date),(CHINA) but iam getting 0.

This is the code i have written.

SET DATE MASK = 'YY/MM/DD'

,, ,,&REGUD-SWABZ(16)& ( i have to get the date from this field ).

Any one help.

Thanks,

Donald

1 ACCEPTED SOLUTION

former_member208856
Active Contributor
0 Kudos

Hi,

you can take the help from this code :

<b>data : day(2), month(2), year(2).

data : date1(10).

data : date type sy-datum.

date = sy-datum.

day = date+6(2).

month = date+4(2).

year = date+2(2).

write: date.

concatenate year '/' month '/' day into date1.

write : date1.</b>

If it is helpful, please donot forget to reward the points.

Sandeep

2 REPLIES 2

former_member208856
Active Contributor
0 Kudos

Hi,

you can take the help from this code :

<b>data : day(2), month(2), year(2).

data : date1(10).

data : date type sy-datum.

date = sy-datum.

day = date+6(2).

month = date+4(2).

year = date+2(2).

write: date.

concatenate year '/' month '/' day into date1.

write : date1.</b>

If it is helpful, please donot forget to reward the points.

Sandeep

Former Member
0 Kudos

These commands are used for specifying the format of date and

time and setting the default country.

<b> /:SET DATE MASK = 'YYYY/MM/DD'</b>

Refer this link

http://sap.niraj.tripod.com/id18.html