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

date fomat

Hi all,

I need the output of date in format..

October 25,2006.

is there any function module to get the output in this format?

Regards,

ajith

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Oct 25, 2006 at 09:05 AM

    Hi,

    just give 10252006 as the input in the parameter and execute the code .

    *----


    REPORT ZEX6 .

    PARAMETERS: V_DATUM(11) TYPE C.

    DATA: V_MON(3) TYPE C,

    V_DAT(2) TYPE C,

    V_YEAR(4) TYPE C,

    V_MONTHNAME(10) TYPE C,

    V_FULLDATE(30) TYPE C.

    CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'

    EXPORTING

    date_external = V_DATUM

    IMPORTING

    DATE_INTERNAL = V_DATUM

    EXCEPTIONS

    DATE_EXTERNAL_IS_INVALID = 1

    OTHERS = 2

    .

    IF sy-subrc <> 0.

    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

    ENDIF.

    WRITE V_DATUM+4(2) TO V_MON.

    WRITE V_DATUM+6(2) TO V_DAT.

    WRITE V_DATUM+0(4) TO V_YEAR.

    SELECT SINGLE LTX FROM T247 INTO V_MONTHNAME

    WHERE SPRAS = SY-LANGU

    AND MNR = V_MON.

    CONCATENATE V_MONTHNAME

    V_DAT ',' v_YEAR

    INTO V_FULLDATE SEPARATED BY SPACE.

    WRITE:/ V_FULLDATE.

    regards,

    Vijay.

    Kindly close the thread if ur query is over .

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 25, 2006 at 07:33 AM

    Hi ajith,

    1. U can make use of the fm

    CONVERSION_EXIT_SDATE_OUTPUT

    25-Oct-2006

    regards,

    amit m.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Oct 25, 2006 at 07:35 AM

    Hi,

    Use the FUnction Module..

    <b>CONVERSION_EXIT_SDATE_OUTPUT</b>

    U will able to get the date in ur format..

    25-Oct-2006.

    Cheers,

    Simha.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 25, 2006 at 07:38 AM

    Hi,

    I need the output in the format

    October 25,2006.

    But using the FM

    CONVERSION_EXIT_SDATE_OUTPUT

    the output is OCT/25/2006

    Regards,

    Ajith

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 25, 2006 at 07:41 AM

    Hi,

    CONVERSION_EXIT_SDATE_OUTPUT

    u can use this fm to get the date as oct/25/2006

    split the date as 0ct,

    25,

    2006

    now u need to write a logic as

    case when 'JAN'

    move 'January' to var.

    ;;;

    ;;

    when 'OCT' to

    move october to var.

    endcase.

    concatenate var(month text) date ',' year into v_val.

    now write v_val . october 25 , 2006

    u need to go this way ..

    hope this helps ,

    Regards,

    Vijay

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 25, 2006 at 09:54 AM

    Hi,

    You can use the FM

    CONVERSION_EXIT_SDATE_OUTPUT

    the output is OCT/25/2006.

    Then using this you can form October 25,2006. By doing the manipulation in the ABAP Code.

    Regards,

    Govindarajan Umadevi.

    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.