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

Date Format.

Hi Friends,

I need to change date format from YYYYMMDD to MM/DD/YY format in the internal table, because i need to send ths internal table to an external non SAP system.

Shejal.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Jun 17, 2006 at 08:15 PM

    write itab-date to itab-date mm/dd/yyyy.

    or

    concatenate itab-date4(2) '/' itab-date6(2) '/'

    itab-date+2(2) into itab-date.

    ~Suresh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 18, 2006 at 03:49 AM

    Hi Shejal,

    There is a function module which takes the date as YYYYMMDD and output it as DD/MM/YYYY.

    Please check this standard FM.

    FM Name : PERIOD_AND_DATE_CONVERT_OUTPUT

    Purpose : Conversion of a date with period

    specification with output.

    Usage :

    Import : YYYYMMDD (Internal Date), Language, Country,

    Internal Period;

    Export : country specific date|period string

    (External Date), External Period,

    External Period Text.

    Int.Period Ext.Period Ext.Date, e.g. Ext.Per.Text

    1 D MM/DD/YYYY

    2 W WW/YYYY Week

    3 M MM/YYYY Month

    4 P ? space

    5 K ? space Calndr

    Hope this will help u in some way.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 18, 2006 at 07:59 AM

    make it simple:

    Use ABAP statement write with formatting option for date field, see also

    http://help.sap.com/saphelp_47x200/helpdata/en/9f/70bed8fe1211d2b92f0000e8353423/frameset.htm

    ABAP Programming (BC-ABA)->ABAP User Dialogs->Creating Lists->Creating Simple Lists with the WRITE Statement->Formatting Options

    write sy-datum MM/DD/YYYY to <target>.

    where target is your character-type output field.

    Regards,

    Clemens

    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.