cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any FM available to convert any date format to system date

Former Member
0 Kudos

Dear All,

Is there any function module available that converts any date format to system date? For e.g. converts MM/DD/YYYY to YYYYMMDD.

Best wishes,

Atanu

Accepted Solutions (1)

Accepted Solutions (1)

laurent_burtaire
Active Contributor
0 Kudos

Hello Atanu,

You can use:

i. CONVERT_DATE_TO_INTERNAL function module.

- input date: 21012010 (without slash)

- output date: 20100121.

ii. KCD_EXCEL_DATE_CONVERT function module

- input date: 21/01/2010 (DATE_FORMAT = 'TMJ')

- output date: 20100121.

Regards.

Laurent.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello

You can convert with out FM using below.

DATA: v_date(10),

v_format(8).

v_date = '05/31/2009'.

CONCATENATE v_date6(4) v_date(2) v_date3(2) INTO v_format.

WRITE: / v_format.

Regards,

Neelima

Former Member
0 Kudos

Thanks Neelima.

The user format is not known. What should we do for generalisation? Is there any FM available?

Best wishes,

Atanu