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 coversion

Former Member
0 Likes
637

How can i convert system date to december 29,2006 format

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
610

Extract the day, month and year using the sub-string operations and use table T247 to get the month name.

Manoj

5 REPLIES 5
Read only

Former Member
0 Likes
611

Extract the day, month and year using the sub-string operations and use table T247 to get the month name.

Manoj

Read only

Former Member
0 Likes
610

u can use this FM 'CONVERSION_EXIT_IDATE_OUTPUT'

Execute the below program and check output

REPORT ychatest LINE-SIZE 350.

TABLES : t247.

DATA : v_date LIKE sy-datum,

v_date_full(09),

v_month(15),

v_final(25).

v_date = sy-datum.

CALL FUNCTION 'CONVERSION_EXIT_IDATE_OUTPUT'

EXPORTING

input = v_date

IMPORTING

output = v_date_full.

SELECT SINGLE ltx FROM t247 INTO v_month WHERE ktx EQ v_date_full+2(3).

CONCATENATE v_month v_date_full+0(2) INTO v_final SEPARATED BY space.

CONCATENATE v_final v_date_full+5(4) INTO v_final SEPARATED BY ','.

WRITE : / v_final.

Message was edited by:

Chandrasekhar Jagarlamudi

Read only

Former Member
0 Likes
610

This will do,


REPORT  zkb_test3.

PARAMETERS: p_date TYPE sy-datum.

DATA: v_date TYPE string.

CASE p_date+4(2).
  WHEN 01.
    CONCATENATE 'January' p_date+6(2) ',' p_date(4)
                INTO v_date SEPARATED BY space.
  WHEN 02.
    CONCATENATE 'Febuary' p_date+6(2) ',' p_date(4)
                INTO v_date SEPARATED BY space.
  WHEN 03.
    CONCATENATE 'March' p_date+6(2) ',' p_date(4)
                INTO v_date SEPARATED BY space.
  WHEN 04.
    CONCATENATE 'April' p_date+6(2) ',' p_date(4)
                INTO v_date SEPARATED BY space.
  WHEN 05.
    CONCATENATE 'May' p_date+6(2) ',' p_date(4)
                INTO v_date SEPARATED BY space.
  WHEN 06.
    CONCATENATE 'June' p_date+6(2) ',' p_date(4)
                INTO v_date SEPARATED BY space.
  WHEN 07.
    CONCATENATE 'July' p_date+6(2) ',' p_date(4)
                INTO v_date SEPARATED BY space.
  WHEN 08.
    CONCATENATE 'August' p_date+6(2) ',' p_date(4)
                INTO v_date SEPARATED BY space.
  WHEN 09.
    CONCATENATE 'September' p_date+6(2) ',' p_date(4)
                INTO v_date SEPARATED BY space.
  WHEN 10.
    CONCATENATE 'October' p_date+6(2) ',' p_date(4)
                INTO v_date SEPARATED BY space.
  WHEN 11.
    CONCATENATE 'November' p_date+6(2) ',' p_date(4)
                INTO v_date SEPARATED BY space.
  WHEN 12.
    CONCATENATE 'December' p_date+6(2) ',' p_date(4)
                INTO v_date SEPARATED BY space.
ENDCASE.

WRITE:/ v_date.

Regards

Kathirvel

Read only

Former Member
0 Likes
610

use table - t247

and here one of my demo codes -

t247 - table for date to month -> sample code -

data : d1(8) value '20051215',

c1(2),

c2(10).

c1 = d1+3(2).

select ktx into x_ktx from T247 where spras = 'E'.

concatenate d16(2) x_ktx d10(4) into c2.

write c2.

Read only

Former Member
0 Likes
610

Thank u all for your valuable help