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

Converting Date

Hi,

I have a date format in yyyy/mm/dd,I want to change it to format dd/mm/yyyy.Can u tell me the logic to do so for which I would be grateful.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 22, 2008 at 05:09 PM

    try this

    say ,

    data : date1(10) value '2008/07/22',

    date2(10).

    concatenate date18(2) date15(2) date1+0(4) into date2 separated by '/'.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 22, 2008 at 05:09 PM

    duplicate deleted

    Edited by: Chandrasekhar Jagarlamudi on Jul 22, 2008 10:40 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 22, 2008 at 05:16 PM

    Hi,

    Check the following code...

    DATA:

    w_date(10) TYPE c VALUE '2008/07/22',

    w_date1(10) TYPE c,

    w_year(4) TYPE c,

    w_mon(2) TYPE c,

    w_day(2) TYPE c.

    w_year = w_date+0(4).

    w_mon = w_date+5(2).

    w_day = w_date+8(2).

    CONCATENATE w_day w_mon w_year INTO w_date1 SEPARATED BY '/'.

    Thanks,

    Phani Diwakar.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 22, 2008 at 05:26 PM

    Hi

    Look this:

     write sy-datum using edit mask '__/__/____'.

    Regards

    Gregory

    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.