on 06-29-2007 12:49 PM
can anyone send me code to replace '/' in date '1/12/200' by '.'
thanks
<b>TRANSLATE v_date using '/.'.</b>
REPORT ychatest.
DATA : v_date(10) VALUE '1/12/2000'.
TRANSLATE v_date using '/.'.
write : v_date.
Message was edited by:
Chandrasekhar Jagarlamudi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
data: w_len1 type i.
data: w_ofst1 type i.
data w_len type i.
data: d_date(10).
d_date = '1/1/2006'.
w_len1 = strlen( d_date ).
do.
if d_date+w_ofst1(1) EQ '/'.
d_date+w_ofst1(1) = '.' .
w_len = w_len + 1.
endif.
w_ofst1 = w_ofst1 + 1.
if w_len eq '2'.
exit.
endif.
enddo.
or use translate command.
HI USE THIS CODE.THIS WIL BE USEFUL
MOVE SY-DATUM+6(2) TO MY_DATE.
MOVE '/' TO MY_DATE+2.
MOVE SY-DATUM4(2) TO MY_DATE3.
MOVE '/' TO MY_DATE+5.
MOVE SY-DATUM0(4) TO MY_DATE6.
SY-TVAR0 = MY_DATE.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
lets take we have v_date = 02/06/2007.
<b>REPLACE ALL OCCURRENCES OF '/' IN V_date WITH '.'.</b>
rewaards if useful,
regards,
nazeer
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
REPORT ZTEST_TC_TEST2.
data: v_date(10) type c.
v_date = '01/02/2007'.
replace all occurrences of '/' in v_date with '.'.
write v_date.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use Replace '.' with '/' into l_f_date.
Reward if helpful.
Regards,
Umasankar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.