‎2007 Jul 20 1:17 PM
hi,
how to convert the date format from internal to external and external to internal.
please provide the code for this.
thanks in advance...
‎2007 Jul 20 1:18 PM
use the FM : CONVERT_DATE_TO_INTERNAL or CONVERT_DATE_TO_EXTERNAL
Regards
Gopi
‎2007 Jul 20 1:22 PM
chk these
CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
EXPORTING
date_external = fromdate
IMPORTING
date_internal = date
EXCEPTIONS
date_external_is_invalid = 1
OTHERS = 2.
IF sy-subrc <> 0.
MESSAGE e050(hrtim_abs_req).
ENDIF.
CALL FUNCTION 'CONVERT_DATE_TO_EXTERNAL'
EXPORTING
DATE_INTERNAL = VLDAT
IMPORTING
DATE_EXTERNAL = DATE
EXCEPTIONS
DATE_INTERNAL_IS_INVALID = 1
OTHERS = 2
‎2007 Jul 20 3:28 PM
CONVERSION_EXIT_PDATE_INPUT
CONVERSION_EXIT_PDATE_OUTPUT
Regds, Murugesh AS
‎2007 Jul 20 3:30 PM
Hi,
Have a look at these links:
<a href="http://sap.ittoolbox.com/code/archives.asp?d=3095&a=s&i=10">convert_date_to_internal FM</a>
<a href="http://www.allsapinfo.com/alvexamples.htm">convert_date_to_external</a>
Pls reward helpful points.
Regards,
Ameet.
Message was edited by:
Ameet Jassani