Date Question...

1

116

I am trying to create a query to give me the results from the first weds of
each month back to the following day after weds. Having trouble formatting
the Date function.

Any help would be greatly appriciated.

Thanks
David
 
K

KARL DEWEY

Create a table CountNumber with field CountNUM containing numbers 0 (zero)
through 6.

SELECT YourTable.*
FROM CountNumber, YourTable
WHERE ((([SomeDate]) Between (Date()-Day(Date())+1)+[CountNUM] And
(Date()-Day(Date())+1)+[CountNUM]-6) AND
((DatePart("w",(Date()-Day(Date())+1)+[CountNUM]))=4));
 
1

116

Thanks Karl for the quick response. I can somewhat see whats going on here.
I do have it workig. I may have explained incorrectly.

We having company meeting on the first Weds of each month. So I trying to
get the posts between these 2 dates. When the next first Weds comes up, the
old posts will not display, so the posts beyond that Weds drop off the
results list.

David

KARL DEWEY said:
Create a table CountNumber with field CountNUM containing numbers 0 (zero)
through 6.

SELECT YourTable.*
FROM CountNumber, YourTable
WHERE ((([SomeDate]) Between (Date()-Day(Date())+1)+[CountNUM] And
(Date()-Day(Date())+1)+[CountNUM]-6) AND
((DatePart("w",(Date()-Day(Date())+1)+[CountNUM]))=4));

--
Build a little, test a little.


116 said:
I am trying to create a query to give me the results from the first weds of
each month back to the following day after weds. Having trouble formatting
the Date function.

Any help would be greatly appriciated.

Thanks
David
 
K

KARL DEWEY

I do not follow your explaination.
Given this data --
1 5/1/2010 Sat
2 5/2/2010 Sun
3 5/3/2010 Mon
4 5/4/2010 Tue
5 5/5/2010 Wed
6 5/6/2010 Thu
7 5/7/2010 Fri
8 5/8/2010 Sat
9 5/9/2010 Sun
10 5/10/2010 Mon
11 5/11/2010 Tue
12 5/12/2010 Wed
13 5/13/2010 Thu
14 5/14/2010 Fri
15 5/15/2010 Sat
16 5/16/2010 Sun
17 5/17/2010 Mon

What do you want returned?

--
Build a little, test a little.


116 said:
Thanks Karl for the quick response. I can somewhat see whats going on here.
I do have it workig. I may have explained incorrectly.

We having company meeting on the first Weds of each month. So I trying to
get the posts between these 2 dates. When the next first Weds comes up, the
old posts will not display, so the posts beyond that Weds drop off the
results list.

David

KARL DEWEY said:
Create a table CountNumber with field CountNUM containing numbers 0 (zero)
through 6.

SELECT YourTable.*
FROM CountNumber, YourTable
WHERE ((([SomeDate]) Between (Date()-Day(Date())+1)+[CountNUM] And
(Date()-Day(Date())+1)+[CountNUM]-6) AND
((DatePart("w",(Date()-Day(Date())+1)+[CountNUM]))=4));

--
Build a little, test a little.


116 said:
I am trying to create a query to give me the results from the first weds of
each month back to the following day after weds. Having trouble formatting
the Date function.

Any help would be greatly appriciated.

Thanks
David
 
K

KARL DEWEY

Given the data below what record set do you want returned?
1 5/1/2010 Sat
2 5/2/2010 Sun
3 5/3/2010 Mon
4 5/4/2010 Tue
5 5/5/2010 Wed
6 5/6/2010 Thu
7 5/7/2010 Fri
8 5/8/2010 Sat
9 5/9/2010 Sun
10 5/10/2010 Mon
11 5/11/2010 Tue
12 5/12/2010 Wed
13 5/13/2010 Thu
14 5/14/2010 Fri
15 5/15/2010 Sat
16 5/16/2010 Sun
17 5/17/2010 Mon

--
Build a little, test a little.


116 said:
Thanks Karl for the quick response. I can somewhat see whats going on here.
I do have it workig. I may have explained incorrectly.

We having company meeting on the first Weds of each month. So I trying to
get the posts between these 2 dates. When the next first Weds comes up, the
old posts will not display, so the posts beyond that Weds drop off the
results list.

David

KARL DEWEY said:
Create a table CountNumber with field CountNUM containing numbers 0 (zero)
through 6.

SELECT YourTable.*
FROM CountNumber, YourTable
WHERE ((([SomeDate]) Between (Date()-Day(Date())+1)+[CountNUM] And
(Date()-Day(Date())+1)+[CountNUM]-6) AND
((DatePart("w",(Date()-Day(Date())+1)+[CountNUM]))=4));

--
Build a little, test a little.


116 said:
I am trying to create a query to give me the results from the first weds of
each month back to the following day after weds. Having trouble formatting
the Date function.

Any help would be greatly appriciated.

Thanks
David
 
1

116

Sorry for the confussion. From upcoming first Weds of the month To the day
after the past first Weds of the month.

David

KARL DEWEY said:
Given the data below what record set do you want returned?
1 5/1/2010 Sat
2 5/2/2010 Sun
3 5/3/2010 Mon
4 5/4/2010 Tue
5 5/5/2010 Wed
6 5/6/2010 Thu
7 5/7/2010 Fri
8 5/8/2010 Sat
9 5/9/2010 Sun
10 5/10/2010 Mon
11 5/11/2010 Tue
12 5/12/2010 Wed
13 5/13/2010 Thu
14 5/14/2010 Fri
15 5/15/2010 Sat
16 5/16/2010 Sun
17 5/17/2010 Mon

--
Build a little, test a little.


116 said:
Thanks Karl for the quick response. I can somewhat see whats going on here.
I do have it workig. I may have explained incorrectly.

We having company meeting on the first Weds of each month. So I trying to
get the posts between these 2 dates. When the next first Weds comes up, the
old posts will not display, so the posts beyond that Weds drop off the
results list.

David

KARL DEWEY said:
Create a table CountNumber with field CountNUM containing numbers 0 (zero)
through 6.

SELECT YourTable.*
FROM CountNumber, YourTable
WHERE ((([SomeDate]) Between (Date()-Day(Date())+1)+[CountNUM] And
(Date()-Day(Date())+1)+[CountNUM]-6) AND
((DatePart("w",(Date()-Day(Date())+1)+[CountNUM]))=4));

--
Build a little, test a little.


:

I am trying to create a query to give me the results from the first weds of
each month back to the following day after weds. Having trouble formatting
the Date function.

Any help would be greatly appriciated.

Thanks
David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top