‎2009 Jun 27 6:46 AM
Hi,
I have a req to convert the date format.
Im fetching ZALDT from PAYR the date format of this ZALDT in database table is MM/DD/YYYY.
After downloading the file to presentation server the date format in the file is displaying as YYYYMMDD.
But i want to convert the date format to MMDDYY without any separators.
I have tried so many options like EDIT mask, FM's, Offshifts but could not get any.
Pls. anybody help me.
Thanks.
‎2009 Jun 27 10:59 AM
Hi,
just check ABAP documentation for ABAP command WRITE. It's well described there. Just convert your date field to string using WRITE command and addition MMDDYY.
WRITE zaldt TO l_output MMDDYY.
Cheers
‎2009 Jun 27 11:09 AM
Hi,
Using the Offset and Position you can buid the date as per your requirement.
l_date = sy-datum+4(2). " Month
l_date+2 = sy-datum+6(2). " Date
l_date+4 = sy-datum+2(2). " Year