‎2006 Dec 15 2:06 PM
Hi All
I want to convet standard date 20061215 (yyyymmdd) into 15/12/2006 format, can any body help me with this.
kind regards
Anup
‎2006 Dec 15 2:06 PM
Please check FM
CONVERSION_EXIT_PDATE_OUTPUT
CONVERSION_EXIT_SDATE_OUTPUT
This depends also on your user parameters
Goto SU01 - Change your Date Format to DD/MM/YYYY
One other way would be
WRITE ws_date to date. - This would convert it according to your user profile
Suppose you want to change under any conditions
and ws_date contains your date value.
DATE : date type char10
CONCATENATE ws_date6(2)ws_date4(2)ws_date+0(4)into date separated by '/'.
‎2006 Dec 15 2:15 PM
Hi
Plz try the following code
Data : lv_date_dest(12) ,
lv_date_src like sy-datum .
lv_date_src = sy-datum.
write 😕 lv_date_dest. " earlier date format
Concatenate lv_date_src6(2) '/' lv_date_src4(2) '/' lv_date_src(4)
into lv_date_dest. .
write 😕 lv_date_dest. " final date format
Regards
Pankaj
‎2006 Dec 15 2:08 PM
Hi,
Use the command,
data:lws_date(10) type c.
WRITE sy-datum to lws_date dd/mm/yyyy.
Regards,
‎2006 Dec 15 2:08 PM
REPORT YCHATEST LINE-SIZE 350.
DATA : V_DATE LIKE SY-DATUM.
V_DATE = SY-DATUM.
WRITE : V_DATE USING EDIT MASK '__/__/____'.
‎2006 Dec 15 2:09 PM
Hi anupam,
1. we can use simple WRITE to variable
concept.
2. just copy paste.
report abc.
data : d1 type sy-datum value '20061215'.
data : s(10) type c.
write d1 to s.
replace all occurrences of '.' in s with '/'.
write 😕 s.
regards,
amit m.
‎2006 Dec 16 4:52 AM
Hi,
Use the code as follows.I've used it in my program.
DATA: VDATE(10) TYPE C.
CONCATENATE sy-datum6(2) sy-datum4(2)
sy-datum+0(4) INTO VDATE
SEPARATED BY '/'.
Hope it helps.
Reward if helpful.
Regards,
Sipra
‎2006 Dec 16 5:20 AM
V1 = date+0(4).
V2 = date+4(2).
V3 = date+6(2).
Concatenate V3 V2 V1 into final_date separated by '/'.
‎2006 Dec 16 5:25 AM
hi,
FM is
CONVERSION_EXIT_PDATE_OUTPUT
Conversion Exit for Domain GBDAT: YYYYMMDD -> DD/MM/YYYY
Regards
Anver
‎2010 Apr 15 12:12 PM
‎2010 Apr 15 1:56 PM
Hi Anupam ... I think you dont have to use any FM for this problem..
This simple piece of code should solve your problem...
data : date type sy-datum.
data : date1(10) type c.
date = '20061215'.
write : date dd/mm/yyyy to date1.
write date1. " This displays ur date in the required format...
now date1 contains the the required date format in dd/mm/yyyy. ie . 15/12/2006
Please revert back in case of any issues...
‎2010 Apr 15 2:15 PM
Please look at the date of the original post before answereing again.
Rob