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: 

need help on Date format

Former Member
0 Kudos

1) How to get the date in the format of YYYYMMAA?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi,

What stands for 'AA'?

9 REPLIES 9

Former Member
0 Kudos

Hi,

What stands for 'AA'?

Former Member
0 Kudos

hi,

use EDIT MASK in write statement.

Regards

Sumit agarwal

Former Member
0 Kudos

hi,

do this way ...


concatenate sy-datum+0(6) 'AA' into v_date. " Provide the AA value in the quotes 

learnsap
Active Participant
0 Kudos

Hi,

What do you mean by AA in the date format YYYYMMAA?

If it is YYYYMMDD format, it is an SAP standard format. If you want to set the user profile settings Go to SU3 transaction and in the Defaults tab set the date format to your desired format.

Regards,

Ramesh

Former Member
0 Kudos

Hi Nani,

Check this sample code.

data : v_datum like sy-datum value sy-datum.
 
 concatenate v_datum+0(4) v_datum+4(2) v_datum+6(2)  into v_date.
 
write : v_date.

Regards,

Suresh.S

sachin_mathapati
Contributor
0 Kudos

Hi,

Try this Fm

CONVERSION_EXIT_LDATE_OUTPUT u2013 Converts date format

Former Member
0 Kudos

Please read [the rules|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement] before posting any further.

You will notice that I have deleted or locked some of your threads. This is known as cross-posting => not allowed.

Welcome to SDN though,

Julius

Former Member
0 Kudos

parameters:p_date type sy-datum .

data:year(4) type c ,

month(2) type c ,

date(2) type c ,

date1(8) type c.

year = p_date+0(4).

month = p_date+4(2).

date = p_date+6(2).

concatenate year month date into date1 .

write:/ date1 .

vinod_vemuru2
Active Contributor
0 Kudos

Hi,

First refrain from posting multiple threads for same question.

What do u mean by AA?

Is it YYYYMMDD?

Variable of type sy-datum always stores date in the format YYYYMMDD. But when u output it displays the seperater.

If u don't want that then simply take it into one character variable.

Check below code.


DATA: date TYPE sy-datum,
      char(8) TYPE c.
date = sy-datum.
char = date.
WRITE: date, char.

Thanks,

Vinod.