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

how to convert character string into date format????

Former Member
0 Likes
1,938

i have an input '80029898' as character string and i wanted to convert it into date format could anyone please tell me how to convert it.....

4 REPLIES 4
Read only

Former Member
0 Likes
840

Move it to a variable of type sy-datum.

i guess that should work,i hvnt tried it but i think it should work.

else you can move it to a variable of length10 and then move the vaule to sy-datum

Hope it helps.

Read only

0 Likes
840

well i have not tried it..

but..

write : ur_string edit mask '__:__:____ '.

should work.

regard.

Manish.

Read only

Former Member
0 Likes
840

you can use the function CONVERT_DATE_TO_INTERNAL.

CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'

EXPORTING

DATE_EXTERNAL = L_VAR1

IMPORTING

DATE_INTERNAL = L_VAR2

EXCEPTIONS

DATE_EXTERNAL_IS_INVALID = 1

OTHERS = 2.

************reward points,if found useful

Read only

Former Member
0 Likes
840

And also....

see this thread...