Application Development and Automation 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: 
Read only

date conversion

Former Member
0 Likes
681

hai all,

i need a conversion of date format.

in my flat file i having the format as 2006-11-27

but i need it in 27.11.2006.

plz help me.

points will be rewarded . thnx in advance.

1 ACCEPTED SOLUTION
Read only

gopi_narendra
Active Contributor
0 Likes
657

Use the FM : CONVERSION_EXIT_PDATE_OUTPUT

Regards

- Gopi

5 REPLIES 5
Read only

gopi_narendra
Active Contributor
0 Likes
658

Use the FM : CONVERSION_EXIT_PDATE_OUTPUT

Regards

- Gopi

Read only

Former Member
0 Likes
657

take variables V1, V2, V3.

V1 = date+0(4).

V2 = date+4(2) or 5(2). Check it

V3 = date+6(2) or 7(2). check it.

Concatenate V3 V2 V1 into date separated by '.'

Now, date will have DD.MM.YYYY

Read only

Former Member
0 Likes
657

Hi,

Check this..

DATA: V_DATE TYPE SYDATUM.

DATA: V_CHAR(10).

V_DATE = SY-DATUM.

CONCATENATE V_DATE6(2) '.' V_DATE4(2) '.' V_DATE(4) INTO V_CHAR.

WRITE: / V_CHAR.

Thanks,

Naren

Read only

Former Member
0 Likes
657

hi,

use this..

if p_date = '2006-11-27'.

<b>concatenate p_date8(2) p_date5(2) p_date+0(4) seperated by ' .'.</b>

rewrd points if helpful.

rgds,

ajith

Read only

anversha_s
Active Contributor
0 Likes
657

hi,

hope u have sydatum type field with u.

data:lcdate(11).

call function 'converstion_exit_idate_output'
exporting
input = sy-datum
importing
output = lcdate.
 
concatenate lcdate(2) lcdate+2(3) lcdate+5(4) into lcdate seperated by '.'.

rgds

Anver