‎2008 Mar 25 10:00 AM
when i m selecting date from database table in internal table it selects in the format as "20080218"
but i want to assign this date to a variable as "18.02.2008"
so how to change date format while assining from internal table field to variable ??
‎2008 Mar 25 10:05 AM
‎2008 Mar 25 10:05 AM
‎2008 Mar 25 10:08 AM
Hi ,
use CONVERSION_EXIT_PDATE_OUTPUT
reward points if helpful
‎2008 Mar 25 10:09 AM
you can either use a date conversion exit.
e.G. the above described.
but a simple write to statement should help you as well.
Just declare youself a variable of type char length 10, and then write your dats variable to this char variable.
the conversion exit should be processed automatically.
‎2008 Mar 25 10:11 AM
Hi
paas the value to conversiondateoutput function module it will convert the same into user set date format
or user write to dd/mm/yyyy
refer this
http://www.abapcode.sapbrainsonline.com/2008/03/write-output-formatting-options-abap.html
regards
Shiva
‎2008 Mar 25 10:13 AM
Hi,
Have a look on the folowing example code.You can get some idea.
data: date1 type sy-datum value '20080325'.
data: date2 type d value '20080326'.
write:/ date1.
write:/ date2.
Reward,if it is useful.
Thanks,
Chandu
‎2008 Mar 25 10:15 AM
HI,
user OFFSET Operater like this.
Concatenate sy-datum8(2) '.' sy-datum6(2) '.' sy-datum0(4) .Regards,
S.Nehru.
‎2008 Mar 25 10:16 AM
Hi use the code.
Data : var like sy-datum.
date(10).
start-of-selection.
concatenate var6(2) '.' var4(2) '.' var+0(4) into date.
write : /1 date.
Reward if useful.
Regards,
Sankar.
‎2008 Mar 25 10:22 AM
Hi Santhosh,
U can use the following code.
date = 20080218
declare new variable date1 of type ur database field type
concatenate date6(2) '.' date4(2) '.' date(4) into date1.
‎2008 Mar 25 10:24 AM
‎2008 Mar 25 10:37 AM
Try this way
data v_date type sydatum.
v_date = '20080218'.
data v_date1 type string.
concatenate v_date6(2) '.' v_date4(2) '.' v_date+0(4) into v_date1.
write v_date1.