04-24-2007 4:35 PM
Hi all,
can any one tell how to change the date format from 20060828 to 8/28/2006
thanks
kajol
04-24-2007 4:49 PM
Hi,
The w_date should be of the data type D.
Ex..
data w_date type sydatum value '20060828'.
data w_char(10).
write w_date to w_char mm/dd/yyyy.
write: / w_char.
Thanks,
Naren
04-24-2007 4:37 PM
Hi
declare date1(10)
write date to date1 using edit mask '- -/- -/----'.
or separate month date year and concatenate
reward if useful
regards
Anji
04-24-2007 4:38 PM
hi,
Make use of CONVERT_DATE_TO_INTERN_FORMAT FM
or
write itab-date to itab-date mm/dd/yyyy.
or
concatenate itab-date+4(2) '/' itab-date+6(2) '/'
itab-date+2(2) into itab-date.
Regards,
Santosh
Message was edited by:
Santosh Kumar Patha
04-24-2007 4:38 PM
do this way...
data: V1(2) type c,
V2(2) type c,
V3(4) type c,
V4(10) type c.
date = 20060828.
V1 = date+4(2).
V2 = date+6(2).
V3 = date+0(4).
concatenate V1 V2 V3 into date separated by '/'.
04-24-2007 4:38 PM
data w_date(10) value '20060828'.
write w_date to w_date mm/dd/yyyy.
~Suresh
04-24-2007 4:46 PM
Hi ,
This thing doesn't work
data w_date(10) type c value '20060828'.
write w_date to w_date mm/dd/yyyy.
is there any FM for this
Thanks
04-24-2007 4:45 PM
DATA: v_dat1 TYPE d.
DATA: v_dat2(10).
v_dat1 = '20060828'.
START-OF-SELECTION.
IF v_dat1+4(1) = 0.
v_dat2(1) = v_dat1+5(1).
v_dat2+1(1) = '/'.
v_dat22(2) = v_dat16(2).
v_dat2+4(1) = '/'.
v_dat2+5(4) = v_dat1(4).
ENDIF.
IF v_dat1+4(1) = 1.
v_dat2+6(4) = v_dat1(4).
v_dat2+5(1) = '.'.
v_dat23(2) = v_dat14(2).
v_dat1+2(1) = '.'.
v_dat2(2) = v_dat1+6(2).
ENDIF.
END-OF-SELECTION.
WRITE:/ v_dat1, v_dat2.
Reward points if helpful.
regards,
Aabhas K Vishnoi
04-24-2007 4:49 PM
Hi,
The w_date should be of the data type D.
Ex..
data w_date type sydatum value '20060828'.
data w_char(10).
write w_date to w_char mm/dd/yyyy.
write: / w_char.
Thanks,
Naren
04-24-2007 4:55 PM
Hi all,
I GOT IT RESOLVED USING CONVERSION_EXIT_PDATE_OUTPUT
I AWARDED POINTS TO ALL
tHANKS