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

conversion of 20070426 to 04/26/2007

Hi all,

I need to convert 20070426 to 04/26/2007. Is there any func. module.Please help me.

Regards,

Karthick.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

7 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Apr 26, 2007 at 04:31 PM

    Hi,

    If you want to write/display the date on the report , you can use the following:

    data: gv_var1 type sy-datum,

    gv_date(10) type c.

    gv_var1 = '20070426'.

    <b>WRITE: gv_var1 to gv_date MM/DD/YYYY.</b>

    But if you just want to store it in some variable and not display it you can use the following:

    data: gv_var1 type sy-datum,

    gv_date(10) type c.

    gv_var1 = '20070426'.

    CONCATENATE gv_var14(2) '/' gv_var16(2) '/' gv_var1+0(4)

    INTO gv_date.

    I hope this helps you!!

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 26, 2007 at 03:30 PM

    You can simple use the write statement.

    write sy-datum to v_date.

    You should have set your own profile with teh date format as __/__/____

    using the following menu.

    Chose from menu

    system->User profile->Own data

    Regards,

    Ravi

    Message was edited by:

    Ravi Kanth Talagana

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 26, 2007 at 03:31 PM

    Simplay use WRITE statement is a addtion on it.

    like Write date1 to date2 MM/DD/YYYY.

    check help on write statement.

    Regards,

    Amey

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 26, 2007 at 03:30 PM

    use

    write <var name> to <char10 var>

    or u can use the fm

    <b>CONVERT_DATE_TO_EXTERNAL</b>

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 26, 2007 at 03:33 PM

    Hi,

    You can use the WRITE statement.

    Check this example..

    DATA: V_DATE TYPE SY-DATUM.

    DATA: V_CHAR(10).

    V_DATE = SY-DATUM.

    WRITE: V_DATE TO V_CHAR.

    OR

    WRITE: V_DATE TO V_CHAR MM/DD/YYYY.

    WRITE: / V_CHAR.

    Thanks,

    Naren

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 26, 2007 at 03:37 PM

    Hi,

    Use EDIT MASK command in WRITE statement.

    Regards,

    Bhaskar

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 26, 2007 at 04:46 PM

    Hi Karthik,

    Also chk the FM CONVERSION_EXIT_PDATE_OUTPUT

    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.