Skip to Content
author's profile photo
Former Member

CAHNGE FORMAT OF DATE

HI

i have dates that i get with format like 20070401 and i wont to change it to

01.04.2007 how i do that?

i reward

thmkes

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    author's profile photo
    Former Member
    Posted on Aug 23, 2007 at 12:02 PM

    Hi Shnya,

    Declare a local variable as below,

    v_date = 20070401.

    constants: c_dot type char01 value '.' (Declaring a DOT)

    data: lv_date type char10.

    CONCATENATE v_date+6(2)

    C_DOT

    v_date+4(2)

    C_DOT

    v_date+0(4)

    INTO

    lv_date.

    <b>Reward points for helpful answers.</b>

    Best Regards,

    Ram.

    Add comment
    10|10000 characters needed characters exceeded

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

    Hi

    U can use the function Module for converting the date to the required formate.

    The modules are.

    1) CONVERT_DATE_TO_EXTERNAL.

    2)CONVERT_DATE_TO_INTERNAL .

    Use the required FM and pass the date to this FM it will return required formate.

    Reward If helpfull.

    Anees.

    Add comment
    10|10000 characters needed characters exceeded