( |
|
|
|||
Increases or decreases the year part of a given date |
Parameters: | |
the date to convert | |
numbers of years to add or subtract | |
procedure OneItemSpec(record RcVc RepSpec,record INVc INr) BEGIN Date mdate,ndate; Date mdate2,ndate2; mdate = AddMonth(RepSpec.sStartDate,-1); // Subtracts one month from the date "RepSpec.sStartDate" mdate2 = AddYear(mdate,-1); // Subtracts one year from the date "mdate" return; END; // You can now also use mdate.year = mdate.year + 1 if you like.
Related topics: |