By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
426,234 Members | 1,844 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 426,234 IT Pros & Developers. It's quick & easy.

Time Period - Finding records that fall in Jan-2008

P: 2
Hello. I have 2 separate date fields in a query. One is called Effective_Date and the other is called Expiry_Date.

I want to compare the time period between these 2 fields and select any records that fall in the month of January-2008.

For example if the Effective_Date = Dec 1, 2007 and Expiry_Date = Feb 5, 2008, then I would keep this record as January-2008 would fall within this time period.
If the Effective_Date=Nov 1, 2007 and Expiry Date was Dec 31,2007 then I do not want this record.

Any help is appreciated
Thanks!!
Jan 9 '08 #1
Share this Question
Share on Google+
1 Reply


Rabbit
Expert Mod 10K+
P: 12,357
Hello. I have 2 separate date fields in a query. One is called Effective_Date and the other is called Expiry_Date.

I want to compare the time period between these 2 fields and select any records that fall in the month of January-2008.

For example if the Effective_Date = Dec 1, 2007 and Expiry_Date = Feb 5, 2008, then I would keep this record as January-2008 would fall within this time period.
If the Effective_Date=Nov 1, 2007 and Expiry Date was Dec 31,2007 then I do not want this record.

Any help is appreciated
Thanks!!
The appropriate criteria would be to keep everything that fits the following two requirements:

Effective_Date <= #1/31/2008#
AND
Expiry_Date >= #1/1/2008#
Jan 9 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.