2007 Sep 19 8:08 AM
hi friends..
i want to convert the date
from 20070901 to 01.09.2007
is there any functional module for this conversion..
can you plz..
Hi Deva,
If you are going to convert the date in a sapscript, then you can use SET DATE MASK = 'MM.DD.YYYY'.
If you want to convert the format in a report, then you can use the Concatenate statement stated in other replies. This could be the simplest way.
Hope this helps.
Thanks.
2007 Sep 19 8:11 AM
Hello,
Try this.
REPORT ZTEST.
DATA : V_DATE LIKE SY-DATUM,
V_DATE1(10).
V_DATE = '20070101'.
CONCATENATE V_DATE6(2) V_DATE4(2) V_DATE+0(4) INTO V_DATE1.
WRITE : V_DATE1.
Some of the FM are used are:
<b>HR_HK_CONV_DATE_TO_INTN_FORMA
PT_IAC_GET_DATE_FORMAT
CONVERT_DATE_TO_INTERN_FORMAT
VALIDATE_BILLING_FORMAT
HRGPBS_HESA_DATE_FORMAT
HRGPBS_TPS_DATE_FORMAT
CONVERT_DATE_FORMAT
SLS_MISC_GET_USER_DATE_FORMAT
SPP02_SET_DATEFORMAT</b>
Regards,
LIJO
2007 Sep 19 8:13 AM
Hi Deva,
You can do it in the following way.
data: lv_date_temp(10),
lv_date type sy-datum.
lv_date = sy-datum.
concatenate lv_date6(2) lv_date4(2) lv_date+0(4) into lv_date_temp separated by '.'.
Reward points if this helps.
Regards,
Ravi G
2007 Sep 19 8:14 AM
Hi deva
if you would like to display in basic list , you can use
WRITE sy-datum DD/MM/YYYY .
Regards
Wiboon
2007 Sep 19 8:16 AM
hi deva
i dont no about FM but you can use this code.
data : da(8) value '20070809',
da1 type sy-datum.
da1 = da.
write 😕 da1.
hope it will help you.
regards
prajwal
2007 Sep 19 8:17 AM
2007 Sep 19 8:55 AM
Hi Deva,
If you need this format for a BDC program then use the below code
data: v_date type sy-datum value '20070901'.
CONCATENATE v_date6(2) v_date4(2) v_date+0(4) INTO v_date.
Now v_date contains '01092007'.
2007 Sep 19 9:38 AM
Hi Deva,
If you are going to convert the date in a sapscript, then you can use SET DATE MASK = 'MM.DD.YYYY'.
If you want to convert the format in a report, then you can use the Concatenate statement stated in other replies. This could be the simplest way.
Hope this helps.
Thanks.
2007 Sep 19 9:43 AM
Hi,
data l_date(12) type c.
write sy-datum to l_date using edit mask 'DD.MM.YYYY'
reward if helpful**
2007 Sep 19 10:37 AM
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |