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

Dynamic date formatting

I want to be able to format a date from a source field of type D into a target of type C (this will go in a file to the bank) such that the format is defined dynamically at run time; so if the user specifies DD/MM/YYYY today would look like 23/10/2007 or if they specified YY-MM-DD they'd get 07-10-23

I've searched for function modules containd DATE or DATUM in the name and I don't find any in our 46C system. I'm kind of surprised there isn't something.

Note: I am not talking about the limited number of hard coded formats available as add-ons to the WRITE command.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Posted on Oct 23, 2007 at 08:56 AM

    Check DATE_STRING

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 23, 2007 at 09:06 AM

    Hi NXO

    Please check FM

    SLS_MISC_CONVERT_TO_DATE

    P_DATE_FORMAT can be of the folowing formats:

    (check domain XUDATFM) or

    DD.MM.YYYY

    MM/DD/YYYY

    MM-DD-YYYY

    YYYY.MM.DD

    YYYY/MM/DD

    YYYY-MM-DD

    GYY.MM.DD (Japanese Date)

    GYY/MM/DD (Japanese Date)

    GYY-MM-DD (Japanese Date)

    YYYY/MM/DD (Islamic Date 1)

    YYYY/MM/DD (Islamic Date 2)

    YYYY/MM/DD (Iranian Date)

    Regards,

    Arun

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 23, 2007 at 01:07 PM

    Thanks for the suggestions, but neither of those exist in our system.

    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.