AnsweredAssumed Answered

Yet another Date problem

Question asked by julianpearcey on Sep 12, 2014
Latest reply on Sep 13, 2014 by julianpearcey


Yet another Date problem


I am writing a script to set a 'next due date' in a table that holds recurring transaction information. There is a date field holding the next due date, and a field holding the period (monthly, quarterly, yearly)

The script will read through the table, check if the next due date is before the system date, and if it is create a transaction in another table (no problem). 

The second part of the script will then recalculate the next due date based on the period from the table.

Thus if the period is quarterly, and the next date was 07/10/2014 (european style), I want the the new next date to be set to 07/01/2015. I have no idea how to achieve this, as you can't just add a number.

Any ideas would be much appreciated.