Skip to Content
author's profile photo Former Member
Former Member

Date conversion from 20071231 into December 31, 2007

Hi All,

Can anyone knows a FM that converts a date like sy-datum 20071231 into wordings like December 31, 2007.

Thanks...

Regards,

JC

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 06:27 AM

    JAycee

    Right solution for you requirment,

    DATA :ws_date(25),

    v_num type i,

    v_no1 type i,

    v_no2 type i.

    CALL FUNCTION 'CONVERSION_EXIT_LDATE_OUTPUT'

    EXPORTING

    input = sy-datum

    IMPORTING

    OUTPUT = ws_date

    .

    v_num = strlen( ws_date ).

    v_no1 = v_num - 8 .

    v_no2 = v_num - 4.

    CONCATENATE ws_date3(v_no1) ws_date0(2) ',' ws_date+v_no2(4) into ws_date.

    write : ws_date.

    Don't forget to reward if useful...

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 06:01 AM

    Hi,

    Try the FM

    'CONVERSION_EXIT_LDATE_OUTPUT'

    Import parameters Value

    INPUT 20071231

    Export parameters Value

    OUTPUT 31. December 2007

    then change if you need

    Regards

    Shiva

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 06:01 AM

    Hi,

    Use the FM : CONVERSION_EXIT_SDATE_OUTPUT

    input: 20071211

    Output : 2007/DEC/11

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 30, 2008 at 06:11 AM

    Jaycee,

    DATA : ws_date(25) TYPE c,

    v_len TYPE i.

    CALL FUNCTION 'CONVERSION_EXIT_LDATE_OUTPUT'

    EXPORTING

    input = sy-datum

    IMPORTING

    OUTPUT = ws_date.

    v_len = strlen ( ws_date ).

    REPLACE '.' with space into ws_date.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.