Skip to Content
avatar image
Former Member

Convert date format YYYYMMDD to DD.MM.YYYY

hi

i was wondering is there a FM which convert date format YYYYMMDD to DD.MM.YYYY

instead of u know cutting the YYYY and MM and DD and concatement them again

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • Best Answer
    Sep 03, 2008 at 11:32 AM

    write sy_datum to var_c_10 DD/MM/YYYY.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 03, 2008 at 11:33 AM

    Hi,

    You can use FM CONVERSION_EXIT_PDATE_OUTPUT. This will always convert from system format (YYYYMMDD) to actual user format (whatever set for the user, actually using the program).

    Hope this will help.

    Regards,

    Nitin.

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 03, 2008 at 12:02 PM

    Hi ,

    See this piece of code

    Data : w_date type dats value '20080903', 
              w_date1(10),
    Constants : C(1) value '.'.
    w_date1 = w_date.
    
    concatenate w_date+6(2) w_date+4(2) w_date+0(4) into w_date1 separated by C.
    
    Write : / w_date1.

    With Regards.

    Alwasy Learner

    Add comment
    10|10000 characters needed characters exceeded

  • Sep 03, 2008 at 12:13 PM

    Hi...

    Check code in this FM...

    HRGPBS_HESA_DATE_FORMAT

    Thanks,

    Naveen.I

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 03, 2008 at 01:34 PM

    Hello There.

    Check out Eric's Correct answer for the same,

    [SDN - Reference - Convert and Concatenate|convert-date]

    Good Luck & Regards.

    Harsh Dave

    Add comment
    10|10000 characters needed characters exceeded