General information
Category:
Coding, syntax & commands
>I have two dates, a start date eg 06/06/1999 and maturity date e.g. 06/03/2000 . The scenario is I have to make valuations on dates falling back from the maturity date at intervals of three months ie. For example, on 06/03/2000, 03/03/2000, 12/03/1999, 09/03/1999. The problem is how to programmatically calculate these dates, specially if the maturity date is the 31st, and 3 months previously, the month was only 30 or 28 days long. If anyone has done anything this before could you let me know, I’d appreciate it.
A starting point would be a specification for the maturity date & how it is calculated in your specific instance for non-existant dates, like 31st February - would it be 28th Feb/3rd March/1st March/29th Feb in leap year ?
Check if the date exists, if it does no problem, if not move to the appropriate date according to the specification.
Also does a none existent date affect subsequent maturity dates, e.g if maturity date was 31st Feb & you chose 28th Feb as the appropriate date, would the next date be 28th or 30th May ?
Paul
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only