2007 Jan 30 6:34 AM
currently my date format is 02122007 . i want to change that to 02/12/2007
regards
shankar
2007 Jan 30 6:36 AM
use edit mask.
write time USING EDIT MASK '____/__/__'.
or use concatenate.
regds,
kiran
2007 Jan 30 6:37 AM
data : v_date like sy-datum value '02122007',
v_date1(10).
concatenate v_date+0(2) v_date+2(2) v_date+4(4) into v_date1 separated by '/'.
2007 Jan 30 6:38 AM
Hi,
u can change this date format by using offset values,
Example:x = 02122007
d = x+0(2)
m = x+2(2)
y = x+4(4)
concatenate d m y into l_date sepearated by '/'.
now ur l_date consist of l_date = 02/12/2007.
Let me know if u have any doubts.
Regards,
Sreedhar
2007 Jan 30 6:38 AM
Hi,
Try this
data y type d value '20071202'.
write (10) y using edit mask '__/__/____'.
write y.
Regards,
Satyendra
2007 Jan 30 6:39 AM
HI,
DATA: month(2),
year(4),
date(2).
data: max_date type c.
move: date_field+0(2) = date.
move: date_field+2(4) = Month.
move: date_field+4(4) = year.
concatinate date month year into max_date separeted by '/'.
2007 Jan 30 6:42 AM
Hi Shankar,
you can <b>concatenate seprated by ' / '</b> .
ex.
<b>concatenate i_date0(2) i_date2(2) i_date+4(4) into i_date1 separated by '/'.</b>
please reward if useful.
2007 Jan 30 6:45 AM
check this.
data : date like sy-datum.
date = sy-datum.
write:/ date using edit mask '__/__/____'.regards,
vijay
2007 Jan 30 6:47 AM
Hi
data : f1 like sy-datum.
f1 = sy-datum.
write:/ f1 using edit mask '__/__/____'.
Reward points.
Regards
Chandrika.
2007 Jan 30 6:57 AM
Hi Shankar,
data z(10) type c value '10082006'.
write /(10) z using edit mask '__/__/____'.
output will be 10/08/2006.
If you declare the variable as type sy-datum, u will get the output as 08/10/2006.
mark all helpful answers
2007 Jan 30 7:09 AM
data: d_date(10).
parameters d_datum like sy-datum default sy-datum.
d_date0(2) = d_datum6(2).
d_date+2(1) = '/'.
d_date3(2) = d_datum4(2).
d_date+5(1) = '/'.
d_date6(4) = d_datum0(4).
write: d_date.
2007 Jan 30 7:52 AM
Hi Shankar ,
I hope solves ur problem if problem is solved then
reward points and close the thraed.
2007 Jan 30 7:56 AM
Hi,
use write (10) y using edit mask '__/__/____'.
i hope it solves ur prob.
2007 Jan 30 8:17 AM
try with this if u wish
REPORT ZEXAMPLE.
DATA: V_DATE LIKE SY-DATUM,
V_DATE2(10).
CALL FUNCTION 'CONVERT_DATE_INPUT'
EXPORTING
INPUT = '21102002' "DD.MM.YYYY
PLAUSIBILITY_CHECK = 'X'
IMPORTING
OUTPUT = V_DATE "YYYY.MM.DD
EXCEPTIONS
PLAUSIBILITY_CHECK_FAILED = 1
WRONG_FORMAT_IN_INPUT = 2
OTHERS = 3.
V_DATE2 = V_DATE.
WRITE:/ V_DATE2.
rewards if helpful
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |