Skip to Content
0
Former Member
Jul 05, 2006 at 07:13 PM

Changing Date format

90 Views

Hello Friends ,

I have a report where the created date ERDAT is displayed in the output as DD/MM/YYYY format . I need to change it to DD/MON/YYYY format. I almost got done with it but for eg ....if my created date is 05/07/2006 in the output. The output should be 05/JUL/2006 in the output.

I am getting the output as 05/JUL/200 .

Please see the snippet code below and give your valuable feedback .

Begin of itab.

erdat(10),

erdat(11),

end of itab.

.....

.....

Loop at itab1.

move-corresponding itab1 to itab.

case itab-erdat+6(2).

WHEN '07'

itab-erdat1+6(3) = 'JUL'.

concatenate itab-erdat4(2) itab-erdat16(3)

t_output-erdat(4)

into t_output-erdat separated by '/'.

......

......

perform build_fieldcat_ddic using:

'ERDAT' 'itab' 'ERDAT' s_tab 'S' ' ' ' ' ' ' ' ' ' '.

Thanks,

Message was edited by: Hari Gopalakrishna