Skip to Content
Former Member
Aug 23, 2010 at 07:35 AM

Need you help !!! -- Convertion from Char to Date


Dear experts:

I am new to abap and here is one thing need your help:

Currently I have a char type field defined in the source table, after I retrive this field into my work area, I need to convert it to Date type and then calculate the last day of this date.

for example: WA_TEST-CHAR = '20100801'. This value in orignal ECC table is char type.

Then How can I convert this value to a date type, and calculate its last day?

My expected result is "20100731".

BTW, does anybody know how to convert a date type field to a number type field like To_number() or something?. If I need to get the period between 2 different date, how can I get this?

Any post will be appreciate and thank you all in advance!

Best Regards


Moderator message: sorry, date conversion and date calculation are very basic and FAQs, please search for available answers, also read ABAP online documentation.

locked by: Thomas Zloch on Aug 23, 2010 9:56 AM