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 fromat converson

Former Member
0 Likes
683

hi,

i want convert date format my database date format is 20070327.

but i want convert this format 27.03.2007 how to do this give me the solustion imediatly.

thaks.

hi,

i want convert date format my database date format is 20070327.

but i want convert this format 27.03.2007 how to do this give me the solustion imediatly.

thaks.

4 REPLIES 4
Read only

rahulkavuri
Active Contributor
0 Likes
649

You can use the function module CONVERSION_EXIT_SDATE_OUTPUT

data: dat type sy-datum, txt(20).

dat = sy-datum.

CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'

EXPORTING

INPUT = date

IMPORTING

OUTPUT = txt

Read only

Former Member
0 Likes
649

Hi,

If you want the user format, then you need to write the below logic,

lets say your date field is L_dat.

Data: date(10) type c.

write L_dat to Date.

write:/ Date. " This will have the user foemat

even, you can use the Function module CONVERT_DATE_TO_EXTERNAL to convert the date to a External format

Regards

Sudheer

Read only

Former Member
0 Likes
649

Hi,

Concatenate itab-date6(2) '.' itab-date4(2) '.' itab-date+0(4) into itab-date.

Shreekant.

Read only

Former Member
0 Likes
649

DATA: NEW_DATE(10) TYPE C.

CONCATENATE OLD_DATA+6(2) OLD_DATA+4(2) OLD_DATA+0(4) 
INTO NEW_DATE SEPARATED BY '.'.

Greetings,

Blag.