A
Andy79
Hello,
Sorry to ask such a simple question;
I would like my query to return all rows were the my 'date' field is
any day in the next month. The year & day of month are not relevant.
I have been getting stuck using (DatePart("m",Date())+1), this works
fine except on December at which point the expression returns 13, and
not 1, and therefore does not find the entries with a date in Jan.
I also need to a similar sets of data where my date field is
(DatePart("m",Date())-1) or ...-3 but again where the months cross
over Dec/Jan this breaks down..
Many Thanks for your help.
"Query to select all MemberID with MembershipStarted date in next
calendar month":
SELECT tblMembersList.MemberID
FROM tblMembersList
WHERE (((DatePart("m",tblMembersList.MembershipStarted))=DatePart("m",
(Date()+1))));
Andy
Sorry to ask such a simple question;
I would like my query to return all rows were the my 'date' field is
any day in the next month. The year & day of month are not relevant.
I have been getting stuck using (DatePart("m",Date())+1), this works
fine except on December at which point the expression returns 13, and
not 1, and therefore does not find the entries with a date in Jan.
I also need to a similar sets of data where my date field is
(DatePart("m",Date())-1) or ...-3 but again where the months cross
over Dec/Jan this breaks down..
Many Thanks for your help.
"Query to select all MemberID with MembershipStarted date in next
calendar month":
SELECT tblMembersList.MemberID
FROM tblMembersList
WHERE (((DatePart("m",tblMembersList.MembershipStarted))=DatePart("m",
(Date()+1))));
Andy