|
Hi,
I've got a date (let's call it JoinDate) being picked up from a drop down menu on a form in the format dd/mm/yyyy
On the following page of the form I need to specify another date (let's call it NewDate) based on the original that meets the following criteria:
1. If the day in JoinDate is earlier than the 7th then NewDate should be the 6th of the following month.
2. If the day in JoinDate is the 7th of the month or later then NewDate should be the 6th of the month after the following month.
So, for example, if JoinDate was 04/11/2005 NewDate would be 06/12/2005 but if it was 07/11/2005 NewDate would be 06/01/2006.
Can anyone help me with how this should be expressed in ASP code. I'm guessing I need to break down JoinDate into the day, month and year elements but then I need to find a way to treat the elements as components of a date or as integers to be able to use operators like ">" and "<=" etc.
Any help would be appreciated,
Bob
|