Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

string to intenal date format and time format

Former Member
0 Likes
479

Hi experts ,

i m getting the date and time fileds from external souces as a string . i need to convert from string to internal sap date format and time format .

how can i do that . pls.help me if any function modules are available .

Regards

Kiran.

Hi experts ,

i m getting the date and time fileds from external souces as a string . i need to convert from string to internal sap date format and time format .

how can i do that . pls.help me if any function modules are available .

Regards

Kiran.

2 REPLIES 2
Read only

Former Member
0 Likes
449

You can use the string operations to convert the date which you get in string to the you system specific date format.

Read only

venkat_o
Active Contributor
0 Likes
449

Try this function module.

REPORT ztest_notepad.
DATA:date_str TYPE string.
DATA:date_i   TYPE datum.

date_str = '24.10.2009'.

CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
     EXPORTING
          date_external            = date_str
     IMPORTING
          date_internal            = date_i
     EXCEPTIONS
          date_external_is_invalid = 1
          OTHERS                   = 2.
Thanks venkat.O