2007 May 10 10:18 AM
Hi all,
In my internal table I have a date field which is in dd/mm/yyy format.But I have to display it in screen as d-mm-yyyy format.
Can anyone guide me how to do that.
Thanks,
Uga.
2007 May 10 10:34 AM
If u have declared the date field of the type date, then u can use the concatenate command to serve your purpose:
Just declare a variable
d_date1 TYPE begda, "Temp Var To Store Start Date
CONCATENATE wa_final_temp-budat+0(4)
wa_final_temp-budat+4(2)
wa_final_temp-budat+6(2) INTO d_date1.
The type begda...i have just taken for reference u can take any other type which supports the date format
Hi all,
In my internal table I have a date field which is in dd/mm/yyy format.But I have to display it in screen as d-mm-yyyy format.
Can anyone guide me how to do that.
Thanks,
Uga.
2007 May 10 10:20 AM
Hi!
If you date is stored in character field, you can use the
REPLACE ALL OCCURRENCES OF '/' IN lv_field WITH '-'.
With date type field, you can change your user profile to modify the date format: choose menu System - User profile - Own data, then set your time format here.
Regards
Tamá
2007 May 10 10:20 AM
Hi
define variables for month, date and year and split that system date to them and concatenate them to a date field required by you and use it on screen.
Reward points if useful
Regards
Anji
2007 May 10 10:21 AM
Hi,
You can do this way ...not exactly but .. try this method out..will work in the way you want the date.,...
DATA: V_INPUT(8) VALUE '20112006'.
DATA: V_CHAR(25).
data: date type sydatum.
DATA: MONTH_NAMES LIKE T247.
SELECT SINGLE * FROM T247
INTO MONTH_NAMES
WHERE SPRAS = SY-LANGU
AND MNR = V_INPUT+2(2).
CONCATENATE MONTH_NAMES-KTX V_INPUT(2) V_INPUT+4(4)
INTO V_CHAR SEPARATED BY SPACE.
write: / V_CHAR.
Regards,
Jayant
2007 May 10 10:34 AM
If u have declared the date field of the type date, then u can use the concatenate command to serve your purpose:
Just declare a variable
d_date1 TYPE begda, "Temp Var To Store Start Date
CONCATENATE wa_final_temp-budat+0(4)
wa_final_temp-budat+4(2)
wa_final_temp-budat+6(2) INTO d_date1.
The type begda...i have just taken for reference u can take any other type which supports the date format
2007 May 10 10:42 AM
Hi Uga,
Refer this code :
data : v_date(10) type char.
concatenate itab-date0(2) '-' itab-date3(2) '-' itab-date+6(4) into v_date.
Reward points if helpful.
Regards,
Hemant
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |