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 format

Former Member
0 Kudos
593

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
Read only

Former Member
0 Kudos
546

hi Ramu,

use FM 'CONVERT_DATE_TO_INTERN_FORMAT'

REgards,

Santosh

Read only

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

write: text.

Read only

Former Member
0 Kudos
546
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
Read only

Former Member
0 Kudos
546

hi santhosh,

use the FM 'CONVERT_DATE_TO_INTERN_FORMAT'

regards

Alfred

Read only

Former Member
0 Kudos
546

hi,

u can use the function module ...

<b>CONVERSION_EXIT_SDATE_OUTPUT</b>

<b>example :</b>

INPUT 20061009

OUTPUT 09.OCT.2006

Read only

Former Member
0 Kudos
546

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.

Read only

anversha_s
Active Contributor
0 Kudos
546

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

Read only

anversha_s
Active Contributor
0 Kudos
546

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

Read only

Former Member
0 Kudos
546
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.
Read only

Former Member
0 Kudos
546

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