‎2007 Jan 02 12:26 PM
hi
checking and validating all date fields (recognizing its format) and formats it into YYYYMMDD..is there any function module to convert the date format is YYYYMMDD.user in different countrys give the date as different...
example:US user give diffrently,and ASIA user give the data format is diffrent.so,is there any FM to identify all the date formats?and give give the date format as YYYYMMDD..
thanks
‎2007 Jan 02 12:29 PM
use the fm:
CONVERT_DATE_TO_INTERN_FORMAT
SAMPLE USAGE:
call function 'CONVERT_DATE_TO_INTERN_FORMAT'
exporting datum = '12/12/2006'
dtype = 'DATS'
importing idate = v_date. "v_date should be of type sy-datum or chracter field of length 8
Regards,
Ravi
Message was edited by:
Ravi Kanth Talagana
‎2007 Jan 02 12:33 PM
hi
Please u can use the following
CONVERT_DATE_TO_INTERNAL for converting the date from external format to inernal format
CONVERT_DATE_TO_EXTERNAL for converting the date from internal format to external format
By the way this process will automatically convert the date into Internal format of the system, award points if found helpful
‎2007 Jan 02 1:16 PM
Dear skk,
Try this Function Module:
<b>DATE_CHECK_PLAUSIBILITY</b> (Check to see if a date is in a valid format for SAP. Works well when validating dates being passed in from other systems.)
Regards,
Abir
************************************
Don't forget to award Points *