‎2007 Aug 08 12:02 PM
hi ,
Can someone plzz tell me if there is a SAP standard function module that can convert date of any format to date of a particular format .
Thanks
Sheetal
‎2007 Aug 08 12:04 PM
hI Sheetal Hirde ,
Try this :
data : v_date like sy-datum.
write : v_date using edit mask '__/__/____'
call function 'CONVERT_DATE_TO_INTERNAL'
Thanks
Vikranth
Message was edited by:
Khimavath Vikranth
‎2007 Aug 08 12:03 PM
no need to use fm just use 'WRITE TO ........... WITH EDIT MASK'
Sameer
‎2007 Aug 08 12:04 PM
hI Sheetal Hirde ,
Try this :
data : v_date like sy-datum.
write : v_date using edit mask '__/__/____'
call function 'CONVERT_DATE_TO_INTERNAL'
Thanks
Vikranth
Message was edited by:
Khimavath Vikranth
‎2007 Aug 08 12:14 PM
hi Vikranth ,
I want to convert YYYY/MM/DD to DD/MM/YYYY.
please advice
‎2007 Aug 08 12:20 PM
Hi Sheetal,
You have to do settings in SU3(T.CODE). In SU3 goto defaults there you find Date Format. try to keep your settings and save it. This will work.
award points if it is useful
Thanks
Vikranth Khimavath
‎2007 Aug 08 12:07 PM
use the fallowing fm DATE_CONV_EXT_TO_INT and
CONVERT_DATE_TO_EXTERNAL
‎2007 Aug 08 12:18 PM
REPORT ZTRIP_TEST .
data:
external_date(10),
sap_date like sy-datum.
external_date = '2006.12.01'.
CALL FUNCTION 'KCD_EXCEL_DATE_CONVERT'
EXPORTING
EXCEL_DATE = external_date
DATE_FORMAT = 'JMT' "(T) Day,(M) Month,(J) Year
IMPORTING
SAP_DATE = sap_date
.
write:/ sap_date.
Message was edited by:
Tripat Pal Singh
‎2007 Aug 08 12:28 PM
‎2007 Aug 08 12:23 PM
Hi,
Data: V_date(10) type c.
v_date = 'yyyy/mm/dd'. " your format.
write : v_date using edit mask '__/__/____' " this will conver the format
If you want the user specfic format, then use the below code
Data: Date1 type Sy-datym,
Date2(10) type c.
date1 = Sy-datum
Write: Date1 to Date2.
Write:/ Date2. " This Date2 will have the user Specif format
Regards
Sudheer