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 Format

Former Member
0 Kudos

Hi

i want today's date 10-7-2005 to be displayed as October-7. Is there any FM for this ?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

This gives output in a format 07.October.2005

I dont want the year in the output.

6 REPLIES 6

Former Member
0 Kudos

Hi,

there is a FM <b>CONVERSION_EXIT_LDATE_OUTPUT</b>.

Hope this is what you are looking for.

Regards,

Stefan

Former Member
0 Kudos

This gives output in a format 07.October.2005

I dont want the year in the output.

0 Kudos

You can use split into three variable(s) at '.'.

and concatenate the month and date with '-'.

Regards,

Baburaj

0 Kudos
data x_month(11).
data lv_datum type sy-datum.

lv_datum = sy-datum.

CALL FUNCTION 'CONVERSION_EXIT_LDATE_OUTPUT'
  EXPORTING
    input         = lv_datum
 IMPORTING
   OUTPUT        = x_month.

write x_month.

gives:<b>07.Oktober</b>

and with the date 20050501:<b>01.Mai</b>

0 Kudos

Hi,

Then you can split and concatnate the string. Sample code :

<b>

SPLIT date_old AT '.' INTO strn1 strn2 strn3.
CONCATENATE strn2 strn1 INTO date_new.

</b>

Here date_old has 07.October.2005 and date_new will have October07. Here strn1,strn2,strn3 are also strings.

Hope this solves your problem.

Regards,

Ravikiran.

PS: Pls assign points for helpful replies.

0 Kudos

DATA: char1(2) type c,

char2(10) type c,

char3(4) type c.

SPLIT '07.October.2005<b>(Output from the funtion module)</b>' at '.' into char1 char2 char3.

concatenate char2 char1 into char2 separated by '-'.

write: /char2(<b>Desired field).</b>