Problem with calculation from date criteria

s_m_chamberlain

Steve Chamberlain
Local time
Today, 21:23
Joined
Jul 26, 2006
Messages
4
Hi, I have a membership database I'm working on and the problem I'm tearing what's left of my hair out over is this:

If the date of joining the club is <= 15th of that month then the renewal date is 1st of that same month in the following year.

However, if the date of joining the club is >15th of that month then the renewal date is 1st of the following month in the following year.

I hope that makes sense/ Example:

JoinDate = 03/08/06 then RenewalDate = 01/08/07

BUT IF

JoinDate = 16/08/06 then RenewalDate = 01/09/07

Any ideas on how I would go about doing this would be greatly appreciated.

I realise that I could simply use the DatAdd() function to add an entire year to the JoinDate, but as you see the criteria I have to work to is unfortunately not that simple.:(

Thanks hopefully.
 
Use this as an expression in a query column:

Code:
IIF(Day(JoinDate)>15, DateSerial(Year(JoinDate)+1, Month(JoinDate)+1, 1), DateSerial(Year(JoinDate)+1, Month(JoinDate),1))

Could be that you need to replace the comma's by semi colons.

RV
 
Thanks I'll give that a go.
 

Users who are viewing this thread

Back
Top Bottom