470,594 Members | 1,131 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,594 developers. It's quick & easy.

Query for records before paydays

I have a table of checking transactions. Some are past, some from
today, and some are dated with future dates (such as recurring
payments).
Is there a way to set up a query for my balance (credits minus debits)
that will exclude transactions that occur after upcoming paydays (1st
and 15th) dynamically? For instance, if I have a transaction scheduled
for the 2nd of next month (after payday on the 1st) I'd like to be able
to separate it dynamically/automatically from the transactions that are
coming out of this payday.
I have tried WHERE <=DateSerial(Year(Date()),Month(Date()),0)
but it only returns transactions up until this month.
Anyone know how to do this?
Thanks for your help.

Aug 18 '06 #1
1 978

OK, I have found how to get it to return all transactions up to and
including the current month's:
WHERE datetransaction<=DateSerial(Year(Date()),Month(Dat e()),31);
where the 31 represents the date of the current month.

Also I see how to query for transactions after a certain date of the
current month, for instance this will return all transactions dated on
or after the 15th of the current month:
WHERE datetransaction>=DateSerial(Year(Date()),Month(Dat e()),15);

But now what I'm having trouble with is how to reference next month.

Aug 18 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Steve | last post: by
3 posts views Thread by Tom Mitchell | last post: by
5 posts views Thread by Daniel Tan | last post: by
6 posts views Thread by Martin Lacoste | last post: by
2 posts views Thread by Fendi Baba | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.