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

FM module for convert date format

Former Member
0 Likes
1,242

Hi ,

Is there any function module for convert date format month dd, yyyy

to yyyymmdd.

Ex : Jan 30,2008 to 20080130.

Points will be awarded .

Thanks in advance,

Satya

10 REPLIES 10
Read only

Former Member
0 Likes
1,188

hi ,

use fm 'PERIOD_AND_DATE_CONVERT_OUTPUT'

reward if helpfull.

Reagards,

Dhan

Read only

Former Member
0 Likes
1,188

Hi,

U can try this code:

if you have a variable lv_date in mmddyyyy formatthen use

Concatenate lv_date+4(4)

lv_date+0(2)

lv_date+2(2)

into lv_date.

Hope it helps you.

Reward points if helpful.

Regards,

Mukul

Read only

Former Member
0 Likes
1,188

CONVERT_DATE_TO_EXTERNAL.

CONVERT_DATE_TO_INTERNAL.

DATE_STRING_CONVERT

Read only

Former Member
0 Likes
1,188

Satya,

Try function module CONVERT_DATE_INPUT.

Regards,

Kiran Bobbala

Read only

0 Likes
1,188

Hi,

Try this FM CONVERT_DATE_TO_INTERN_FORMAT

Reward if usefull,

Thanks,

Ramya.R

Read only

kiran_k8
Active Contributor
0 Likes
1,188

Hi,

1.CONVERSION_EXIT_SDATE_OUTPUT

changes the date format as 31 Aug 2007 if given as 31/08/2007.

2.DATE_CONV_EXT_TO_INT

User formatted date is converted to system date.

Check the system date format.

K.Kiran.

Read only

Former Member
0 Likes
1,188

Hi,

first convert the month from string to number.

i think there is no function module.

once u convert to 01302008 then use convert_date_to_internal to change to yyyymmdd.

Edited by: Poonam Naik on Jun 6, 2008 12:31 PM

Read only

Former Member
0 Likes
1,188

CONCATENATE field+4(4) field(4) INTO l_date_internal.

Read only

Former Member
0 Likes
1,188

hi use this,

parameters:p_date type d.

data: v_date1 type d.

.

CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'

EXPORTING

DATE_EXTERNAL = p_date

IMPORTING

DATE_INTERNAL = v_date1.

write:/ v_date1.

reward points if useful,

Read only

Former Member
0 Likes
1,188

Satya,

there is no FM for this specific requirement.

you just code using split and concatenate.

Amit.