473,386 Members | 1,795 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Date Ranges???

I am trying to pull back records for a specific date range. I have an effectivedate column that I am using. But I am finding that this isnt working as I originally thought it was going to.

My initial thought was to just add a couple of parameter fields to part of the SQL where clause would look something like this:
(effectivedate >= {?pfld_BegDate} and effectivedate <= {?pfld_EndDate})

This doesn’t work. Here is an example: If my date range is 1/1/07 to 4/1/07 it will only look for effective dates between this window. So if there was a row that has an effective of 12/1/06, it would not display as the effective date is not between the date range. Even though it is an effective row between this time frame.

Any ideas?
Apr 23 '07 #1
2 1224
code green
1,726 Expert 1GB
i may not understand but I think you are trying to use dates as flags within a table and pull out all data between the flags. Well it is a database and not a spreadsheet so the row arrangement is meaningless. You need an extra field, probably autonumber, then you can use this field for your flags, and still reference the dates
Apr 24 '07 #2
Hi,

I think your asking to get the data between the begining date and ending date.
and in your sql where condition syntax is what you wrote is wrong.
Are you using PHP to execute this query.
if yes,
$pfld_BegDate="2007/01/01";
$pfld_EndDate="2007/01/04";
"(effectivedate >=".$pfld_BegDate." and effectivedate <=".$pfld_EndDate.")"
Try it.I think you will definetly get the result.
Apr 25 '07 #3

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

Similar topics

2
by: Maksim Kasimov | last post by:
there are few of a time periods, for example: 2005-06-08 12:30 -> 2005-06-10 15:30, 2005-06-12 12:30 -> 2005-06-14 15:30 and there is some date and time value: 2005-06-11 12:30 what is the...
2
by: bobb | last post by:
Is there a way to select count(*) by grouping by date, and having multiple date ranges? combining... select field,count(*) from table where datefield > 2004/1/1 and datefield < 2004/1/31 and...
7
by: Thomas R. Hummel | last post by:
Hello all, I am trying to write a query that compares a member's enrollment period with the products that their group has had during that period (all members belong to a group and the products...
12
by: Steve Elliott | last post by:
I have a query set up to gather together data between two specified dates. Shown in the query column as: Between #24/09/2004# And #01/10/2004# Is it possible to enter several different date...
2
by: junkaccount | last post by:
Hello, Using Access 2000 I would like to create one report that returns sales data for various date ranges input by the user i.e. weekly, monthly, etc. This report is bound to a query that pulls...
67
by: PC Datasheet | last post by:
Transaction data is given with date ranges: Beginning End 4/1/06 4/4/06 4/7/06 4/11/06 4/14/06 4/17/06 4/18/06 4/21/06 426/06 ...
4
by: norma.j.hildebrand | last post by:
I have a database that has a field (performance standard), every year the standard changed which was not a problem since we start out each year with a blank database and just change the standards...
10
by: kyosohma | last post by:
Hi, I am working on a timesheet application in which I need to to find the first pay period in a month that is entirely contained in that month to calculate vacation time. Below are some example...
16
by: Alex30093 | last post by:
OK This is my 1st post to any forum, but I rely on forums all the time. Short story is I find myself needing to become a Access DBA for work. Situation: I want to use one table of events that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.