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 conversion

Former Member
0 Likes
526

Hi everybody.

can anyone tell me how to convert the date from yyyy/mm/dd to dd/mm/yyyy. with syntax...

thanks in advance....

Edited by: mhyderali on Sep 13, 2011 2:04 PM

Basic date questions are not allowed

Edited by: Suhas Saha on Sep 13, 2011 5:55 PM

2 REPLIES 2
Read only

BH2408
Active Contributor
0 Likes
491

Hi,

Use the WRITE statement...

Read only

madhu_vadlamani
Active Contributor
0 Likes
491

Hi ,

Check like this

REPORT Z_EGERS.

TABLES: egers.

TYPES: BEGIN OF t_egers,

bglnum LIKE egers-bglnum,

END OF t_egers.

DATA: eegers TYPE t_egers,

gt_egers TYPE TABLE OF t_egers.

SELECTION-SCREEN BEGIN OF BLOCK michal

WITH FRAME TITLE text-001.

PARAMETERS: ddmmrr RADIOBUTTON GROUP rad1,

rrmmdd RADIOBUTTON GROUP rad1.

SELECTION-SCREEN END OF BLOCK michal.

IF ddmmrr = 'X'.

SELECT bglnum

INTO CORRESPONDING FIELDS OF eegers

FROM egers

APPEND eegers TO gt_egers.

ENDSELECT.

-


LOOP AT gt_egers INTO eegers.

DATA mydate like egers-bglnum.

DATA: year(4) type c,

month(2) type c,

date(2) type c.

year = mydate+4(4).

month = mydate+2(2).

date = mydate(2).

write: / year no-gap, month no-gap, date.

Try with this function module also

CONVERSION_EXIT_PDATE_OUTPUT

Regards,

Madhu.