03-01-2005 4:32 PM
Howdy,
I want to get the previous day to the one that is entered by the user. Thereofre I coded the following:
Code:
<b>DATA: lv_date TYPE date,
new_datab TYPE knvh-datab.
lv_date = new_datab.
lv_date = lv_date - 1. </b>
lv_date should now have the previous day to that entered in new_date.
However I ran it for today 01.03.2005 and it does not give me 28.02.2005?
Instead it gives me 00.03.2005????
Does anyone know why this would be occurring?
03-01-2005 4:37 PM
03-01-2005 4:37 PM
03-01-2005 4:45 PM
03-01-2005 4:46 PM
Hi Steve,
you should have value 20050301 in new_datab (internal format!).
Then
SUBTRACT 1 FROM lv_date.
will work (at least date adding / subtracting is handled internally correct).
Regards,
Christian
03-01-2005 4:58 PM
You should be a doctor Rich! You've cured my headache
Do you know why type <b>date</b> does not work?
Thanks again!
03-01-2005 5:11 PM