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 field manipulation

Former Member
0 Likes
692

Hi All,

DATA : D1 type D.

D1 = v_date.

v_date contains current date. but when it go to D1 it shows wrong date format. it is taking 8 characters only. i want to send total date like 12/12/2008..but it is showing 12/12/20.Why

Thanks,

Subbu.

1 ACCEPTED SOLUTION
Read only

former_member582701
Contributor
0 Likes
671

Type Date has a long of 8 chars and your variable seems that contain th output format.

When u are doing D1 = v_date u are copying only the first 8 bytes.

In order to fix u can concatenate:

CONCATENATE v_date(2) v_date3(2) v_date7(4) INTO D1.

regards.

5 REPLIES 5
Read only

former_member582701
Contributor
0 Likes
672

Type Date has a long of 8 chars and your variable seems that contain th output format.

When u are doing D1 = v_date u are copying only the first 8 bytes.

In order to fix u can concatenate:

CONCATENATE v_date(2) v_date3(2) v_date7(4) INTO D1.

regards.

Read only

0 Likes
671

is there any way to pass total date string into variable.

Read only

0 Likes
671

u can try using CONVERT_DATE_TO_INTERNAL

Althought i have seen always the ouput type format for dates like this 12.06.2008 instead of 12/06/2008 but u can try with this FM.

If it does not work i think that u will have to use concatenate statement.

Regards

Read only

0 Likes
671

This function module converting ddmmyyyy format.

i want dd/mm/yyyy format.

Read only

Former Member
0 Likes
671


data: l_date(10) type c.

write sy-datum to l_date.

write l_date.