Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

CAHNGE FORMAT OF DATE

Former Member
0 Kudos

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

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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.

2 REPLIES 2

Former Member
0 Kudos

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.

Former Member
0 Kudos

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.