‎2006 Aug 17 10:56 PM
Hi,
I have a date like 20060817, I want to convert this date like August 17 2006.I need a space after the month and date.
Is there any function module available..
how can we convert this...
thanks in advance,
fractal
‎2006 Aug 17 11:14 PM
I don't believe that there is a function module to do it all, but you can try this.
report zrich_0001 .
data: datum type sy-datum.
data: datum_out type string.
data: it247 type table of t247 with header line.
datum = sy-datum.
call function 'MONTH_NAMES_GET'
tables
month_names = it247.
read table it247 with key spras = sy-langu
mnr = datum+4(2).
concatenate it247-ltx sy-datum+6(2) sy-datum+0(4)
into datum_out separated by space.
write:/ datum_out.
REgards,
Rich Heilman
‎2006 Aug 17 11:10 PM
Hi,
I am not sure of a function module but you can use this code..
DATA: V_CHAR(25).
data: date type sydatum.
DATA: MONTH_NAMES LIKE T247.
SELECT SINGLE * FROM T247
INTO MONTH_NAMES
WHERE SPRAS = SY-LANGU
AND MNR = SY-DATUM+4(2).
CONCATENATE SY-DATUM+6(2) MONTH_NAMES-LTX SY-DATUM(4)
INTO V_CHAR SEPARATED BY SPACE.
write: / V_CHAR.
Hope this works..
Thanks,
Naren
‎2006 Aug 17 11:14 PM
I am getting a date format like 20060921.
Convert to September 21 2006.
thanks,
fractal
‎2006 Aug 17 11:23 PM
‎2006 Aug 17 11:14 PM
I don't believe that there is a function module to do it all, but you can try this.
report zrich_0001 .
data: datum type sy-datum.
data: datum_out type string.
data: it247 type table of t247 with header line.
datum = sy-datum.
call function 'MONTH_NAMES_GET'
tables
month_names = it247.
read table it247 with key spras = sy-langu
mnr = datum+4(2).
concatenate it247-ltx sy-datum+6(2) sy-datum+0(4)
into datum_out separated by space.
write:/ datum_out.
REgards,
Rich Heilman