‎2008 May 16 7:23 AM
Hi All,
I am getiing the date in the formate 16-05-2008,now I have to change it into 20080516,can any one help me how to conert it.
Thanks®ds,
Sree.
‎2008 May 16 7:26 AM
data : date1(10) type c value '16-05-2008',
date2(8).
concatenate date16(4) date13(2) date1+0(2) into date2.
‎2008 May 16 7:28 AM
‎2008 May 16 7:29 AM
‎2008 May 16 7:32 AM
Hi,
I used this FM ,but it is not converting the my date formate can u check it once.
thanks®ds,
Sree.
‎2008 May 16 7:37 AM
HAve u tried this either CONVERSION_EXIT_PDATE_INPUT
I give 16.05.2008 and get 20080516 as output.
If not you can use the offsets
Date+4(4)
date+2(2)
date+0(2)
Regards
Gopi
‎2008 May 16 7:30 AM
Hi,
CONVERSION_EXIT_PDATE_OUTPUT
DATE_CONVERT_TO_FACTORYDATE
DATE_GET_WEEK
DATE_COMPUTE_DAY
CONVERT_DATE_TO_ALPHA_NUMERIC
PERIOD_AND_DATE_CONVERT_INPUT
DATE_IN_FUTURE
SLS_MISC_GET_USER_DATE_FORMATDATE_CHECK_PLAUSIBILITY
CONVERT_DATE_TO_INTERN_FORMAT
Regards,
Shiva Kumar
‎2008 May 16 7:32 AM
Hi,
Use concatenate statement.
data: date1 type sy-datum,
date2 type d.
date1 = '16-05-2008'.
concatenate date16 date13(2) date1+0(2) into date2.
write:/ date2.
Reward,if useful.
Thanks,
Chandu
‎2008 May 16 7:32 AM
Hi,
just copy paste and run this code.
DATA:V_DATE1(10),
V_DATE(10).
V_DATE = '03032008'. "-----> format of mmddyyyy
concatenate V_DATE4(4) '.' V_DATE2(2)'.' V_DATE+0(2) into V_DATE1.
Write:V_DATE1. "-------> will be of the format yyyy.mm.dd
Or also try this:
parameters:p_date type d.
data: v_date1 type d.
.
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
DATE_EXTERNAL = p_date
IMPORTING
DATE_INTERNAL = v_date1.
write:/ v_date1.
Hope this helps.
Reward Points if found helpfull..
Cheers,
Chandra Sekhar.
‎2008 May 16 7:33 AM
Hi,
Declare that date in one varaible
gv_date = 10052008
gv_year = gv_date+4(4)
gv_mth = gv_date+2(2)
gv_dt = gv_date(2)
CONCATENATE gv_year gv_mth gv_dt into gv_newdate.
condense gv_newdate.
Variable gv_newdate this variable will now have the date in yyyymmdd format
Try this.............
‎2008 May 16 7:37 AM
hi SnickyUcan,
data : w_date type d.
W_DATe = sy-datum.
write:/ w_date.if found helpfull do reward.
Regards.
Eshwar.
‎2008 May 16 7:47 AM
Hi,
Please use FM CONVERT_DATE_TO_INTERNAL.
Thanks,
Sriram Ponna.