03-28-2008 7:52 AM
Hi,
I Iwant to convert system date format from YYYYMMDD to DDMMYYYY.
I need a function module to do that.
I have used Function Module to change the format to DD.MM.YYYY
But i want to remove dots from that format.
Please give an example for the same..
Regards,
Ash
03-28-2008 7:59 AM
Hi,
data:v_date like sy-datum,
v_date1(10) type c.
Concatenate v_date6(2) v_date4(2) date+0(4) into vdate1.
RESULT = V_DATE1
Reward If useful
Regards
Ravi
Edited by: Ravikanth Alapati on Mar 28, 2008 9:00 AM
03-28-2008 7:56 AM
concatenate sy-datum6(2) sy-datum4(2) sy-datum+0(4) into variable.
use this variable as output.
03-28-2008 7:59 AM
Hi,
data:v_date like sy-datum,
v_date1(10) type c.
Concatenate v_date6(2) v_date4(2) date+0(4) into vdate1.
RESULT = V_DATE1
Reward If useful
Regards
Ravi
Edited by: Ravikanth Alapati on Mar 28, 2008 9:00 AM
04-13-2015 3:04 PM
03-28-2008 7:59 AM
hi,
do this way ..
date : v_final(10),
v_sdate like sy-datum value sy-datum,
v_date(10).
v_date = v_sdate.
cocatenate v_date+6(2) v_date+4(2) v_date+0(2) into v_final.
Regards,
Santosh
03-28-2008 8:03 AM
go to sap easy access initial screen.
goto menu
systems-> userprofike-> owndata--->
click default tab. there u can change format
11-28-2011 10:55 AM
Hi kumar,
Thanks for the solution to change the system date and time format.
03-28-2008 8:03 AM
hi asha ,
suppose,from the function module form which you are getting the date in a field var_date.
Just use this code :
Replace all occurences of '.' with space in var_date.
condense var_date with no-gaps.
Or you can use this code also
concatenate sy-datum6(2) sy-datum4(2) sy-datum+0(4) into var_date.
03-28-2008 8:03 AM
03-28-2008 8:09 AM
hi use this....
parameters:p_date type sy-datum.
data: data1(4) ,
data2(2),
data3(2),
data(8).
data1 = p_date+0(4).
data2 = p_date+4(2).
data3 = p_date+6(2).
concatenate data3 data2 data1 into data.
write:/ data.
regards,
venkat.
03-28-2008 8:18 AM
Hi Asha,
Try using the below code
DATA : date TYPE sy-datum,
result(10) TYPE c.
CONCATENATE date+6(2) date+4(2) date+0(2) into result.
WRITE : result.
Regards,
Chandru
11-10-2010 8:57 AM
HI,
How did you changed the date format from YYYYMMDD to DD.MM.YYYY.
What is theFM you have used?
Regards
11-10-2010 9:21 AM
Hi,
you can change the data format in many ways.
1. change in user profile Systems -> userprofile --> own data in tab defaults.
2. by concatenate sy-datum6(2) sy-datum4(2) sy-datum+0(4) into sy-datum
3. by using edit mask command
DATA : date1 TYPE char8,
date2 TYPE char10,
date1 = sy-datum.
WRITE date1 USING EDIT MASK '__/__/____' TO date2.
or
WRITE date1 USING EDIT MASK '__.__.____' TO date2.
or
WRITE date1 USING EDIT MASK '__-__-____' TO date2.
or
WRITE date1 USING EDIT MASK '__ __ ____' TO date2.
4. using function module : HRGPBS_HESA_DATE_FORMAT