‎2008 Apr 15 5:18 AM
is any function module available to change the date format yyyy/mm/dd to yyyy/mm
Thanks
Kumar
‎2008 Apr 15 5:32 AM
Hi Kumar,
Instead of using a funtion module you can directly convert to the required format.
data : lv_date1(10),
lv_date2(7).
lv_date1 = '2008/04/15'.
move lv_date1+0(7) to lv_date2.
now lv_date2 has the required format.
Regards,
Ravi G
‎2008 Apr 15 5:33 AM
hi
i think you have to use offset for this you can try using this
data: v_datum(10) type c.
concatenate sy-datum+4(2) '/' sy-datum +2(2) .
write:/ v_datum.
Or u can try these FM
CONVERSION_EXIT_SDATE_OUTPUT,
CONVERSION_EXIT_LDATE_OUTPUT.
Hope its helpful
‎2008 Apr 15 5:45 AM
Hey,
Go through this link,
http://sap.ittoolbox.com/code/archives.asp?d=3095&a=s&i=10
FORM CONVERT-DATE.
>
> SELECT SINGLE * FROM USR01 WHERE BNAME = SY-UNAME.
> CASE USR01-DATFM.
> WHEN '1' OR '2' OR '3'. "JJ.MM.AAAA
> WA_JJ = SY-DATUM(2).
> WA_MM = SY-DATUM+2(2).
> WA_AAAA = SY-DATUM+4(4).
> WHEN '4' OR '5' OR '6'. " AAAA.MM.JJ
> WA_JJ = SY-DATUM+6(2).
> WA_MM = SY-DATUM+4(2).
> WA_AAAA = SY-DATUM(4).
> ENDCASE.
> ENDFORM.