06-10-2008 3:27 PM
Greetings Abapers
I am writing a program which outputs a file in csv format. Currently the date is shown in the file as 20080609000000 but i would like it to be shown as 09.06.2008. Help anyone?
06-10-2008 3:32 PM
Hi,
Declare a variable of type ' C ' lenght 10 and pass the date into that variable.
now u can easily download the date into CSV format
Best regards,
raam
06-10-2008 3:37 PM
Hi Mandimika,
declare a variable:
dl_ddate(10) type C.
*move the date to be written tp the file to this variable
WRITE DS_FINAL-EINDT TO DL_DDATE MM.DD.YYYY NO-ZERO.
Hope this helps,
Keerthi.
06-10-2008 3:40 PM
it seems that you have concatenated timestamp with year .
just concatenate w_a+6(2)
'.'
w_1+2(2)
'.'
w_a(4)
into w_b .
now move this field w_b to excel
06-10-2008 3:47 PM
PERFORM format_date USING v_begda CHANGING w_cdate.
FORM format_date USING i_date
CHANGING r_date.
r_date+0(2) = i_date+6(2).
r_date+2(1) = '.'.
r_date+3(2) = i_date+4(2).
r_date+5(1) = '.'.
r_date+6(4) = i_date+0(4).
ENDFORM. " format_date
06-10-2008 3:52 PM
you can also use WRITE TO statement
eg
data: unformated(8) type c,
formated(10) type c.
WRITE unformated TO formated DD/MM/YYYY.