Records from now until end of next month (1 Viewer)

2wistd

Registered User.
Local time
Today, 06:39
Joined
Jan 17, 2013
Messages
66
I am using the following code to get results from next month,

Code:
Month([ptdate])=Month(Now())+1
which works great to get next months results. I try to get what is left of this month by adding the code:

Code:
Between Now() And Month([ptdate])=Month(Now())+1

This actually gives me results from July and August, eventhough it is Sept.
Basically I want the results from the remainder of this month until the end of next month.

Help!
 

plog

Banishment Pending
Local time
Today, 08:39
Joined
May 11, 2011
Messages
11,668
This should do it:


>=Date() AND <=DateSerial(Year(Date()),Month(Date())+2,0)

First part means its greater or equal than today, second part determines the last day of next month.
 

apr pillai

AWF VIP
Local time
Today, 19:09
Joined
Jan 20, 2005
Messages
735
>=Date() AND <=DateSerial(Year(Date()),Month(Date())+2,0)

OR

Code:
Between Date() AND dateserial(year(date()),month(date())+2,1)-1
 

Users who are viewing this thread

Top Bottom