473,771 Members | 2,297 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Time Period - Finding records that fall in Jan-2008

2 New Member
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
1 1434
Rabbit
12,516 Recognized Expert Moderator MVP
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

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

Similar topics

9
3732
by: Steve Jorgensen | last post by:
Hi all, I'm working on the schema for a database that must represent data about stock & bond funds over time. My connundrum is that, for any of several dimension fields, including the fund name itself, the dimension may be represented in different ways over time, and may split or combine from one period to the next. When querying from the database for an arbitrary time period, I need the data to be rolled up to the smallest extent...
3
17916
by: CrystalDBA | last post by:
I am using SQL Server 2000. I need to query my database for all the contracts that came in during a certain time frame (user is prompted for reportingperiodid). Table - Periods Fields - Reporting Period id int Reporting Period desc varchar(30) Reporting Period Begin Date datetime Reporting Period End Date datetime
3
2700
by: Dave | last post by:
Hi I am hoping someone might be able to help me out with this. I am writing a helpdesk system which records agents logging in and out of the system. I need to write a stored procedure which will show the peak number of agents logged in concurrently during a specified time period. Within the time period, the person viewing the report should be able to
17
4926
by: Sue | last post by:
<html> Is there someone here that can help me validate the period as the fourth from the last character in an email address. There is other information and validation on the form I have to do but the period in the email address is the only part I am having problems with. I have posted part of my code below. Any help would be greatly appreciated. THANKS !
3
3239
by: trialofmiles | last post by:
Is there any reason why RegExp wouldn't be able to find a period? str = '256.89'; a = new RegExp('(\.)'); b = /(\.)/; alert(str.replace(a, 'x$1x')); alert(str.replace(b, 'x$1x')); The alert for a says x2x56.89
5
2147
by: Rated R1 | last post by:
I wrote this before in the NGs, so I am going to paste the responses that I got and see if someone can please help me. Email me and we can set something up as Id even be willing to pay for your time to get me to learn this procedure: MY ORIGINAL POST: I am trying to create a database for my small business. I have typed a bunch of information in a table in 5 columns (style, mm, karat, quantity, labor cost). We have different labor...
2
2851
by: ElkGroveR | last post by:
Hi there! I'm using PHP to create a simple, dynamic MySQL SELECT query. The user chooses a selection from a HTML Form SELECT element's many options and submits the form via a POST action. The SELECT query is built as follows: $itemtype = stripslashes(trim($_POST));
5
1589
by: thermate | last post by:
Dr.Bricmont, We are extremely proud of you for your brilliant analysis and courage to come out and say it. Your article brings out not one but several key concepts, worth close reading. The physicists like myself are proud to have one among us like you who seems to have an acute sense of humanitarianism .... ================= January 31, 2007 Resistance to Imperialism What is the Decisive "Clash" of Our Time?
3
1970
by: tdes42 | last post by:
I believe I am looking for some form of Join Query, but my understanding of Access logic and my logic do not yet click entirely…. I have a table of ocean buoy data, taken every hour over many days (hopefully a whole year if it doesn’t slow things down too much): tblBuoy Date Time Swell Direction Swell Period Swell Height 5/6/2007 15:00 195 14.2 2.568
4
1793
by: biff | last post by:
Hi, I have a problem with an MS Access SQL query that does not pull the records I need. Bascially what I need is all records between 4 or 5 days which also fall between 7:00 AM and 10:15 AM. All times before and after the set period must be excluded. A few of the variations I've tried are as follows: 1. WHERE logtime >= #01-Feb-2009 07:00:00 AM# AND logtime <= #04-Feb-2009 10:15:00 AM#
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9910
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8933
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7460
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6712
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3609
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.