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: 

date format

Former Member
0 Kudos
142

Hi All,

I need set the date to like 12 july 2006.

I wirting the code in the exit.

How to apply this format to my date field.

Thanks in Advance.

Thanks&Regards.

Ramu.

10 REPLIES 10

Former Member
0 Kudos
95

hi Ramu,

use FM 'CONVERT_DATE_TO_INTERN_FORMAT'

REgards,

Santosh

Former Member
0 Kudos
95
data: date type sy-datum,
      text(20).
 date = sy-datum.
 CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT' 
 EXPORTING  
  INPUT         = date
 IMPORTING  
 OUTPUT        = text.

write: text.

Former Member
0 Kudos
95
Hi Ramu

chk this

CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
        EXPORTING
          input  = l_s_laufdt-low
        IMPORTING
          output = l_laufdt_low.


do some mauplations and change the output accordingly

Former Member
0 Kudos
95

hi santhosh,

use the FM 'CONVERT_DATE_TO_INTERN_FORMAT'

regards

Alfred

Former Member
0 Kudos
95

hi,

u can use the function module ...

<b>CONVERSION_EXIT_SDATE_OUTPUT</b>

<b>example :</b>

INPUT 20061009

OUTPUT 09.OCT.2006

Former Member
0 Kudos
95

Use the below conversion exit:

CONVERSION_EXIT_IDATE_OUTPUT

CONVERSION_EXIT_IDATE_INPUT

When u pass 20060101 to CONVERSION_EXIT_IDATE_OUTPUT it will return you 01 JAN 2006.

Regards,

Prakash.

anversha_s
Active Contributor
0 Kudos
95

hi ramu,

chk this.

data:lcdate(11).

call function

'converstion_exit_idate_output'

exporting

input = sy-datum

importing

output = lcdate.

concatenate lcdate(2) lcdate2(3) lcdate5(4) into lcdate seperated by space.

--lcdate is your required format.

sample data ..sy-datum = 20060830

lcdate = 30 AUG 2006

rgds

anver

if hlped mark points

anversha_s
Active Contributor
0 Kudos
95

hi ramu,

chk this.

data:lcdate(11).

call function

'converstion_exit_idate_output'

exporting

input = sy-datum

importing

output = lcdate.

concatenate lcdate(2) lcdate2(3) lcdate5(4) into lcdate seperated by space.

--lcdate is your required format.

sample data ..sy-datum = 20060830

lcdate = 30 AUG 2006

rgds

anver

if hlped mark points

Former Member
0 Kudos
95
try this

REPORT YCHATEST.

DATA : V_DATE(12).

CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
  EXPORTING
    INPUT  = SY-DATUM
  IMPORTING
    OUTPUT = V_DATE.

REPLACE ALL OCCURRENCES OF '/' IN V_DATE WITH SPACE .

CONCATENATE V_DATE+3(2) V_DATE+0(3) V_DATE+5(4)
     INTO V_DATE SEPARATED BY SPACE.

WRITE : V_DATE.

Former Member
0 Kudos
95

use this fm.

CONVERT_DATE_TO_ALPHA_NUMERIC

Converts internal date to DD Mon YY

Import : YYYYMMDD, Language; Export : DD Mon YY.

hope this helps .

Regards,

Vijay