‎2009 Jun 24 11:04 AM
Hi, I need to convert a date like this:
2001-07-24T00:00:00.0000000+02:00
in SAP format:
20010724
How can I do it?
There is a function module? THANKS
‎2009 Jun 24 11:11 AM
Hi,
can try this simple code:
DATA A TYPE STRING VALUE '2001-07-24T00:00:00.0000000+02:00'.
DATA VA_DATA LIKE SY-DATUM.
REPLACE ALL OCCURENCES OF '-' IN A WITH ''.
VA_DATA = A(8).
WRITE VA_DATA.
Angelo.
‎2009 Jun 24 11:11 AM
Hi,
can try this simple code:
DATA A TYPE STRING VALUE '2001-07-24T00:00:00.0000000+02:00'.
DATA VA_DATA LIKE SY-DATUM.
REPLACE ALL OCCURENCES OF '-' IN A WITH ''.
VA_DATA = A(8).
WRITE VA_DATA.
Angelo.
‎2009 Jun 24 11:11 AM
if your format consists of first 10 characters as date always then u can write your logic.
say text is your variable.
extract like text+0(9).
pass it to FM CONVERT_DATE_TO_INTERNAL to convert it
‎2009 Jun 24 11:13 AM
if your format consists of first 10 characters as date always then u can write your logic.
say text is your variable.
extract like text+0(9).
pass it to FM CONVERT_DATE_TO_INTERNAL to convert it
‎2009 Jun 24 11:13 AM
if your format consists of first 10 characters as date always then u can write your logic.
say text is your variable.
extract like text+0(9).
pass it to FM CONVERT_DATE_TO_INTERNAL to convert it
‎2009 Jun 24 11:23 AM
Hi,
try this TZ_GLOBAL_TO_LOCAL.
here u pass date and time ,u'll get according to ur format.
Regards,
Ranjitha.