04-26-2007 4:29 PM
Hi all,
I need to convert 20070426 to 04/26/2007. Is there any func. module.Please help me.
Regards,
Karthick.
04-26-2007 5:31 PM
Hi,
If you want to write/display the date on the report , you can use the following:
data: gv_var1 type sy-datum,
gv_date(10) type c.
gv_var1 = '20070426'.
<b>WRITE: gv_var1 to gv_date MM/DD/YYYY.</b>
But if you just want to store it in some variable and not display it you can use the following:
data: gv_var1 type sy-datum,
gv_date(10) type c.
gv_var1 = '20070426'.
CONCATENATE gv_var14(2) '/' gv_var16(2) '/' gv_var1+0(4)
INTO gv_date.
I hope this helps you!!
04-26-2007 4:30 PM
use
write <var name> to <char10 var>
or u can use the fm
<b>CONVERT_DATE_TO_EXTERNAL</b>
04-26-2007 4:30 PM
You can simple use the write statement.
write sy-datum to v_date.
You should have set your own profile with teh date format as __/__/____
using the following menu.
Chose from menu
system->User profile->Own data
Regards,
Ravi
Message was edited by:
Ravi Kanth Talagana
04-26-2007 4:31 PM
Simplay use WRITE statement is a addtion on it.
like Write date1 to date2 MM/DD/YYYY.
check help on write statement.
Regards,
Amey
04-26-2007 4:33 PM
Hi,
You can use the WRITE statement.
Check this example..
DATA: V_DATE TYPE SY-DATUM.
DATA: V_CHAR(10).
V_DATE = SY-DATUM.
WRITE: V_DATE TO V_CHAR.
OR
WRITE: V_DATE TO V_CHAR MM/DD/YYYY.
WRITE: / V_CHAR.
Thanks,
Naren
04-26-2007 4:37 PM
04-26-2007 5:31 PM
Hi,
If you want to write/display the date on the report , you can use the following:
data: gv_var1 type sy-datum,
gv_date(10) type c.
gv_var1 = '20070426'.
<b>WRITE: gv_var1 to gv_date MM/DD/YYYY.</b>
But if you just want to store it in some variable and not display it you can use the following:
data: gv_var1 type sy-datum,
gv_date(10) type c.
gv_var1 = '20070426'.
CONCATENATE gv_var14(2) '/' gv_var16(2) '/' gv_var1+0(4)
INTO gv_date.
I hope this helps you!!
04-26-2007 5:46 PM