If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Date Question...
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 |
#2
|
|||
|
|||
Date Question...
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" wrote: 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 |
#3
|
|||
|
|||
Date Question...
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" wrote: 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" wrote: 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 |
#4
|
|||
|
|||
Date Question...
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" wrote: 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" wrote: 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" wrote: 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 |
#5
|
|||
|
|||
Date Question...
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" wrote: 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" wrote: 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" wrote: 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 |
#6
|
|||
|
|||
Date Question...
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" wrote: 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" wrote: 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" wrote: 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" wrote: 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 |
Thread Tools | |
Display Modes | |
|
|