From: 116 on 14 May 2010 14:41 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
From: KARL DEWEY on 14 May 2010 16:17 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
From: 116 on 15 May 2010 09:24 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
From: KARL DEWEY on 17 May 2010 10:57 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
From: KARL DEWEY on 17 May 2010 13:06
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 |