Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Date Format

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

Tags:
Former Member
Former Member replied

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

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question