‎2007 Jun 29 1:37 PM
date is in MM.DD.YYYY format i want to convert it in DD.MM.YYYY without using any FM, date could be '10.2.2000' or '1.2.2000'.. can anybody send me the code?
Thanks
‎2007 Jun 29 1:45 PM
HI..,
data:
w_date1 type sy-datum,
w_date2(10) type c,
w_date3(10) type c,
w_dd(2) type c,
w_mm(2) type c,
w_yy(4) type c.
w_date1 = sy-datum.
write w_date1 to w_date2.
split w_date2 at '.' into w_mm w_dd w_yy.
concatenate w_dd '.' w_mm '.' w_yy into w_date3.
write w_date3.
reagrds,
sai ramesh
‎2007 Jun 29 1:39 PM
Hi Anju
Try like this
data: var1(4) type c,
data: lv_formatdate(10) type c.
var2(2) type c,
var3(2) type c.
lv_date = sy-datum.
var1 = lv_date+(4).
var2 = lv_date+4(2).
var3 = lv_date+6(2).
concatenate var2 var3 var1 into lv_formatdate separated by '.'.
Reward all helpfull answers
Regards
Pavan
Message was edited by:
Pavan praveen
‎2007 Jun 29 1:40 PM
Hi,
Use the addition Edit mask with write statement.
Reward if helpful
‎2007 Jun 29 1:41 PM
Hi ,
normally date will be comign in before display in formay yyyymmdd.
normally you cna use date mask or you cna do string operation and cut this date field and arrange in the order u want and concatenate.
rewars if useful.
Regards,
Sasi
‎2007 Jun 29 1:43 PM
Hi Anju,
lets say date1 is holding the current value.
data date2(8) type c.
concatenate date12(2) '.' date10(2) '.' date1+4(4) into date2.
Now you have required format in date2.
Award points if helpful,
Kiran
‎2007 Jun 29 1:45 PM
HI..,
data:
w_date1 type sy-datum,
w_date2(10) type c,
w_date3(10) type c,
w_dd(2) type c,
w_mm(2) type c,
w_yy(4) type c.
w_date1 = sy-datum.
write w_date1 to w_date2.
split w_date2 at '.' into w_mm w_dd w_yy.
concatenate w_dd '.' w_mm '.' w_yy into w_date3.
write w_date3.
reagrds,
sai ramesh
‎2007 Jun 29 2:02 PM
Hi,
use the code as under :
*MM.DD.YYYY format i want to convert it in DD.MM.YYYY
data: date type sy-datum,
date1(10) type c,
date2(10) type c,
day(2),
Month(2),
year(4).
date1 = '06.29.2007'.
day = date1+3(2).
month = date1+0(2).
year = date1+6(4).
concatenate day '.' month '.' year into date2.
write 😕 date1.
write 😕 date2.
Regards,
Sandeep Kaushik
‎2007 Jun 29 2:06 PM
‎2007 Jun 29 5:06 PM
Hi anju,
split date at '.' into month day year.
concatenate day month year into date separated by '.'.
Regards,
Clemens