2007 Jun 27 8:40 AM
hi
i want to change date format i m getting date formate this <b>20070627.</b>
but i want this format in <b>27.06.2007</b>
please suggest me .
thanks in advanced.
2007 Jun 27 8:52 AM
Hi,
Try this.
lv_date type sy-datum.
lv_formatdate(10) type c.
var1(4) type c,
var2(2) type c,
var3(2) type c.
lv_date = 20070627.
var1 = lv_date+(4).
var2 = lv_date+4(2)
var3 = lv_date+6(2).
contatenate var3 var2 var1 into lv_formatdate separated by '.'
Thanks,
Sandeep.
2007 Jun 27 8:44 AM
Hi,
try like this.
data:v_date(8) type c value '20070627',
v_date1(10).
Concatenate v_date6(2) '.' v_date4(2) '.' v_date+0(4) into v_date1.
Message was edited by:
Vigneswaran S
2007 Jun 27 8:47 AM
HEllo,
Use this.
Data: lv_datum.
write sy-datum to lv_datum.
write: lv_datum
Regards,
VAsanth
2007 Jun 27 8:48 AM
Hi ,
U can try write statement for this.
Take the date into a variable say date1.
Write date1 to date1 dd.mm.yyyy.
2007 Jun 27 8:49 AM
Hi,
Do this.
DATA: lv_dt(10) type c.
lv_dt = table1-f1( the field from which ur date is coming.)
concatenate lv_dt6(2) lv_dt4(2) lv_dt+0(4)
into lv_dt
separated by '.'
write:/ lv_dt.
This will sove ur problem
Regards:
Sapna
Do reward points if u find this helpful
2007 Jun 27 8:52 AM
Hi,
Try this.
lv_date type sy-datum.
lv_formatdate(10) type c.
var1(4) type c,
var2(2) type c,
var3(2) type c.
lv_date = 20070627.
var1 = lv_date+(4).
var2 = lv_date+4(2)
var3 = lv_date+6(2).
contatenate var3 var2 var1 into lv_formatdate separated by '.'
Thanks,
Sandeep.
2007 Jun 27 8:58 AM
Hi
Declare the variable type as sy-datum.
write sy-datum to l_date.
You will have to change your user settings to dd.mm.yyyy otherwise you will have to use concatenate with offsets separated by DOT.
Regards
Navneet