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

need help on Date format

Former Member
0 Likes
991

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
932

Hi,

What stands for 'AA'?

9 REPLIES 9
Read only

Former Member
0 Likes
933

Hi,

What stands for 'AA'?

Read only

Former Member
0 Likes
932

hi,

use EDIT MASK in write statement.

Regards

Sumit agarwal

Read only

Former Member
0 Likes
932

hi,

do this way ...


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

Read only

learnsap
Active Participant
0 Likes
932

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

Read only

Former Member
0 Likes
932

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

Read only

sachin_mathapati
Contributor
0 Likes
932

Hi,

Try this Fm

CONVERSION_EXIT_LDATE_OUTPUT u2013 Converts date format

Read only

Former Member
0 Likes
932

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

Read only

Former Member
0 Likes
932

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 .

Read only

vinod_vemuru2
Active Contributor
0 Likes
932

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.