Application Development 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: 

Convert Date

former_member386202
Active Contributor
0 Kudos
168

Hi friends,

Is there any function module using which we can convert

date into string.

for ex. 05.07.2007 to 05-July-2007

Thankx,

Prashant Patil

1 ACCEPTED SOLUTION

Former Member
0 Kudos
83
************************
  data: gd_date(8).  "field to store output date

* Converts date from 20010901 to 01SEP2001
  gd_date   = sy-datum.
  CALL FUNCTION 'CONVERSION_EXIT_IDATE_OUTPUT'
    EXPORTING
      input         = gd_date
    IMPORTING
      OUTPUT        = gd_date.

reward points if it is usefull ...

Girish

8 REPLIES 8

Former Member
0 Kudos
83

Hi Prashant ,

U can use write statement for this,

Try following,

Write date to date1 dd-mmm-yyyy.

Reward points if useful.

Former Member
0 Kudos
83

Hi,

Use FM DAY_ATTRIBUTES_GET.

Regards,

Raju chitale

Former Member
0 Kudos
83

Hi

Check the fun modules

CONVERT_DATE_TO_INTERNAL and CONVERT_DATE_TO_EXTERNAL

or split the given date to YEAR,MONTH and DATE

and fetch the month description from the table T247

and concatenate the Date,month text and year into a string and use

Reward points for useful Answers

Regards

Anji

Former Member
0 Kudos
83

Hi

Convert the date into INternal format by using Exit_internal

Use this Fm

CONVERSION_EXIT_SDATE_OUTPUT

and pass the below values

Import parameters Value

INPUT 20070704

Export parameters Value

OUTPUT 04.JUL.2007

regards

Shiva

Former Member
0 Kudos
83
REPORT ychatest.

DATA:  int_datum     LIKE sy-datum VALUE '20070705',
       ext_datum(11) TYPE c.



CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
  EXPORTING
    input  = int_datum
  IMPORTING
    output = ext_datum.

TRANSLATE ext_datum USING '.-'.
WRITE : ext_datum.

former_member235056
Active Contributor
0 Kudos
83

Hi,

Use spell_date as u use speel_amount function module.

pls reward points.

Regards,

Ameet

Former Member
0 Kudos
83

dear Prashant,

This will help you

dat = sy-datum.

str = dat+4(2).

SELECT SINGLE ktx FROM t247 INTO str WHERE spras = 1 AND mnr = str.

CONCATENATE dat+6(2) ' ' str ' ' dat(4) INTO str.

Regards

Sarath

Former Member
0 Kudos
84
************************
  data: gd_date(8).  "field to store output date

* Converts date from 20010901 to 01SEP2001
  gd_date   = sy-datum.
  CALL FUNCTION 'CONVERSION_EXIT_IDATE_OUTPUT'
    EXPORTING
      input         = gd_date
    IMPORTING
      OUTPUT        = gd_date.

reward points if it is usefull ...

Girish