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

date conversion function module

Former Member
0 Likes
1,660

Hi All,

Please let me know which fun module can be used to convert the date to this format 01 JAN 2007(IF we pass the system date the output should give like this)

Thanks&Regards

mahesh

4 REPLIES 4
Read only

Former Member
0 Likes
799

try this

REPORT YCHATEST.

DATA : V_DATE(12).
 
CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
  EXPORTING
    INPUT  = SY-DATUM
  IMPORTING
    OUTPUT = V_DATE.
 
 
WRITE : V_DATE.

Read only

Former Member
0 Likes
799

Hello,

Use the FM

<b>CONVERSION_EXIT_SDATE_OUTPUT</b>

REward if helps.

Vasanth

Read only

Former Member
0 Likes
799

You can use DATE_STRING_FORMAT function. It can take the following format codes, in date_format input field

1 DD.MM.YYYY

2 MM/DD/YYYY

3 MM-DD-YYYY

4 YYYY.MM.DD

5 YYYY/MM/DD

6 YYYY-MM-DD

7 GYY.MM.DD (Japanese Date)

8 GYY/MM/DD (Japanese Date)

9 GYY-MM-DD (Japanese Date)

A YYYY/MM/DD (Islamic Date 1)

B YYYY/MM/DD (Islamic Date 2)

So create an interanal table with two fields mapping JAN, FEB, MAR etc to 01, 02, 03 etc. Read the array for your input month and convert your date to DD.MM.YYYY format and then call DATE_STRING_FORMAT which can convert your date to internal date format

For reverse conversion though you can use CONVERSION_EXIT_SDATE_OUTPUT

Read only

0 Likes
799

Hi ALL,

I got the fun module conversion_exit_idate_output which will solve this problem

thanks to u all.