Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

converting date format from 14/07/08 to 14-jul-08

hi all ,

i want to convert date format from 14/07/08 to 14-jul-08 . is there any function module for this ?.

kindly reply.

regards,

siya

Tags:
Former Member
Former Member replied

Hi Siva,

Check the code below.

    • For getting date format in the form like 10.Dec.2008*

WHEN '01'.

CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'

EXPORTING

input = date2

IMPORTING

output = date_format.

IF sy-subrc EQ 0.

date_format1 = date_format.

ENDIF.

    • For getting date in the format like 10.December.2008*

WHEN '02'.

CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'

EXPORTING

input = date2

IMPORTING

output = date_format.

IF sy-subrc EQ 0.

  • Get Month Long text

SELECT SINGLE ltx

FROM t247 INTO ws_month

WHERE ktx EQ date_format+3(3)

AND spras EQ 'E'.

IF sy-subrc EQ 0.

CONCATENATE date_format0(2) ws_month date_format7(4) INTO date_format1 SEPARATED BY space.

ENDIF.

ENDIF.

Hope this helps,

Manish

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question