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

Former Member
0 Kudos

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

rahulkavuri
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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

Former Member
0 Kudos

Hi,

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

Shreekant.

former_member583013
Active Contributor
0 Kudos

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.