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 Format

Former Member
0 Likes
306

Hi Gurus,

I am getting the date from my input file in various format, such as mm/dd/yy or mm/dd/yyyy or yyyy/mm/dd, is there any FM with which I can convert the date in this Format <b>mm/dd/yyyy</b>.

Thanks

Rajeevv

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
280

Hi,

Do like this

CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'

EXPORTING

date_external = cdate

IMPORTING

date_internal = datum

EXCEPTIONS

date_external_is_invalid = 1

OTHERS = 2.

concatenate datum+6(2)

datum+4(2)

datum+0(4)

into date_out separated by '/'.

WRITE: / date_out.

Regards,

Satish

Message was edited by:

Satish Panakala

1 REPLY 1
Read only

Former Member
0 Likes
281

Hi,

Do like this

CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'

EXPORTING

date_external = cdate

IMPORTING

date_internal = datum

EXCEPTIONS

date_external_is_invalid = 1

OTHERS = 2.

concatenate datum+6(2)

datum+4(2)

datum+0(4)

into date_out separated by '/'.

WRITE: / date_out.

Regards,

Satish

Message was edited by:

Satish Panakala