Getting a range of dates 
Author Message
 Getting a range of dates

I need to get a range of dates spaning several years.  I have a customer
table with bithdates in it and I need to look up the Bdays comming up in
January, February, etc.  Can anyone help me with code that will do such
a thing.  I can write example eliments in a query but the range of years
is just too big.  any help will be greatly appreceiated...



Fri, 15 Oct 1999 03:00:00 GMT
 Getting a range of dates

Quote:

> I need to get a range of dates spaning several years.  I have a customer
> table with bithdates in it and I need to look up the Bdays comming up in
> January, February, etc.  Can anyone help me with code that will do such
> a thing.  I can write example eliments in a query but the range of years
> is just too big.  any help will be greatly appreceiated...

in your query in the field that contains the dates

        >=01/01/65,<=01/01/87

Obviously change your dates!!!

HTH

Che



Sat, 16 Oct 1999 03:00:00 GMT
 Getting a range of dates

Another way to process is to use the following query syntax to select all
dates for a specific month

example for january

customer.db     | name          | Bday          |
                | check         | check 01/../..   |



Quote:
> I need to get a range of dates spaning several years.  I have a customer
> table with bithdates in it and I need to look up the Bdays comming up in
> January, February, etc.  Can anyone help me with code that will do such
> a thing.  I can write example eliments in a query but the range of years
> is just too big.  any help will be greatly appreceiated...



Sat, 16 Oct 1999 03:00:00 GMT
 Getting a range of dates

Quote:

>Another way to process is to use the following query syntax to select all
>dates for a specific month

>example for january

>customer.db | name          | Bday          |
>                    | check         | check 01/../..   |



>> I need to get a range of dates spaning several years.  I have a customer
>> table with bithdates in it and I need to look up the Bdays comming up in
>> January, February, etc.  Can anyone help me with code that will do such
>> a thing.  I can write example eliments in a query but the range of years
>> is just too big.  any help will be greatly appreceiated...

Actually, you'd use 2/..    months are not stored with the leading
zero.

As for a range, use    >=xx,<=yy
where xx and yy are defined dates



Sat, 16 Oct 1999 03:00:00 GMT
 Getting a range of dates

Quote:

>>Another way to process is to use the following query syntax to select all
>>dates for a specific month

>>example for january

>>customer.db    | name          | Bday          |
>>                       | check         | check 01/../..   |



>>> I need to get a range of dates spaning several years.  I have a customer
>>> table with bithdates in it and I need to look up the Bdays comming up in
>>> January, February, etc.  Can anyone help me with code that will do such
>>> a thing.  I can write example eliments in a query but the range of years
>>> is just too big.  any help will be greatly appreceiated...

>Actually, you'd use 2/..    months are not stored with the leading
>zero.
>As for a range, use    >=xx,<=yy
>where xx and yy are defined dates

Actually, the best thing to do is to set up a lookup-table for all the dates
you are likely to use, with date as the primary-key, and look up the
information you need by joining to it in a query.  Here's the table that we
use:
        ftp://ftp.primenet.com/users/s/sundial/mth-tran.zip

If anyone wants the script I used to generate it just let me know and I'll
find it.



Wed, 20 Oct 1999 03:00:00 GMT
 
 [ 5 post ] 

 Relevant Pages 

1. Searching a date range with a date range ??

2. SQL Query - date range in a date range

3. Extracting specific date range from larger date range

4. Getting a date range

5. SQL query to return two rows - a date range and the same range a year previous

6. Filter Accross Date Range - Different Filter Value for Different Dates

7. Select Distinct Date by Weekday and Date Range

8. find previous date in a range of dates query question

9. Very Slow when date range includes future date

10. Insert date in between date range

11. Insert date in between date range

12. Q:get current date and then create date range


 
Powered by phpBB® Forum Software