2008 May 12 8:40 AM
i have date in the internal table with the format yyyymmdd (8 character format)
now i want to conver it into another format like dd.mm.yyyy(10 character format)
can u help..??
i have date in the internal table with the format yyyymmdd (8 character format)
now i want to conver it into another format like dd.mm.yyyy(10 character format)
can u help..??
2008 May 12 8:42 AM
Hi,
CALL FUNCTION 'CONVERT_DATE_TO_INTERN_FORMAT'
EXPORTING
datum = lv_date1
dtype = 'DATS'
IMPORTING
idate = lv_date2.
write lv_date2.
Check the link for more
https://forums.sdn.sap.com/click.jspa?searchID=11664956&messageID=4805923
Regards,
Raj.
2008 May 12 8:44 AM
2008 May 12 8:46 AM
date = '20070520'.
data : yr(4) type n,
mt(2) type n,
dt(2) type n.
yr = date+0(4).
mt = date+4(2).
dt = date+6(2).
concatenate all the values to some varible you will get
the sequence of concatenate is dt mt ur.
Regards,
madan.
2008 May 12 8:47 AM
data: v_date like sy-datum value '20080512'.
data: v_date_result(10).
concatenate v_date6(2) v_date4(2) v_date+0(4) into v_date_result separated by '.'.
2008 May 12 9:00 AM
Hi,
u can try like this........
present format is s_date = yyyymmdd.
concatenate s_date6(2) '.' s_date4(2) '.' s_date+0(4) into n_date.
where n_date(10) type c.
Regards,
kk.
2008 May 12 9:17 AM
Hi Sandeep,
Try this logic.I will check this logic.For me it is working fine...can u check it once..
data: lv_date like sy-datum.
write sy-datum using edit mask '__.__.__' to lv_date..
Here instead of sy-datum u have to use ur internal table field ok...
Reward points if helpful..
Kiran Kumar.G.A
2008 May 12 9:58 AM
hi sandeep ,
try this one program,
DATA:w_indate TYPE d ,
w_temp TYPE d ,
w_outdate(10) TYPE c.
w_indate = sy-datum .
WRITE: 'Input date is ', w_indate .
CALL FUNCTION 'DATE_CONV_EXT_TO_INT'
EXPORTING
i_date_ext = w_indate
IMPORTING
E_DATE_INT = w_temp
EXCEPTIONS
ERROR = 1
.
write: / w_temp .
w_temp = w_indate .
CONCATENATE w_temp6(2) w_temp4(2) w_temp+0(4) INTO w_outdate separated by '.' .
WRITE: / 'Output date is ', w_outdate .
it will give you desired format.
Regard ,
sandeep patel
reward point if useful
Edited by: Sandeep patel on May 12, 2008 2:28 PM
2008 May 12 10:03 AM
Here is the simplest logic which will take the user's setting of date ie, date will be displayed according to the user's setting
Data: v_date(10) type c.
write sy-datum to v_date.
write v_date.
V_Date will contain your desired formate
Reward points if helpful.
Regards
Bikas
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |