‎2007 Mar 05 4:06 PM
Hi ,
For BDC i m getting date in the format '1/1/2006', but i want to convert it to '01/01/2006', hoe can i achive this?
Thanx
‎2007 Mar 05 4:09 PM
‎2007 Mar 05 4:07 PM
You having a laugh. You cannot write someting to resolve this yourself.
Maybe u should call yourself unlucky ABAP.
‎2007 Mar 05 4:09 PM
‎2007 Mar 05 4:09 PM
refer code below,
data: v_month(2) type c,
v_day(2) type c,
v_year(4) type c,
v_date(12),
date(10) value '11/2/2006'.
split date at '/' into v_month v_day v_year.
if v_day+1 is initial.
v_day+1 = v_day.
v_day+0(1) = 0.
endif.
if v_month+1 is initial.
v_month+1 = v_month.
v_month+0(1) = 0.
endif.
concatenate v_month v_day v_year into v_date separated by '/'.
write:/ v_date.
reward if useful.
‎2007 Mar 05 4:19 PM
Hi Lucky,
try with this
To set the date in the required format
SET COUNTRY 'US'.
write: / sy-datum.
SET COUNTRY 'IN'.
write: / sy-datum.
data: date_mask TYPE c LENGTH 6.
WRITE sy-datum to date_mask ddmmyy.
write : / date_mask." YYMMDD.
If helps reward points.