Mar 14, 2006 #1 patrichek MIS Nov 18, 2003 632 US hi, how would i format a query to look for records -2,-3 and -4 days ago? i understand to use date()-2 for records 2 days ago. thanks!
hi, how would i format a query to look for records -2,-3 and -4 days ago? i understand to use date()-2 for records 2 days ago. thanks!
Mar 14, 2006 Thread starter #2 patrichek MIS Nov 18, 2003 632 US ok, i've figured out that between date()-2 and date()-3 works now i need to add -4 to the mix, help? thanks! Upvote 0 Downvote
ok, i've figured out that between date()-2 and date()-3 works now i need to add -4 to the mix, help? thanks!
Mar 14, 2006 #3 OhioSteve MIS Mar 12, 2002 1,352 US sample data: myDateField 3/10/2006 3/11/2006 3/12/2006 3/13/2006 3/14/2006 sql: SELECT Table1.myDateField FROM Table1 WHERE (((Table1.myDateField)>Date()-5 And (Table1.myDateField)<Date()-1)); output: myDateField 3/10/2006 3/11/2006 3/12/2006 Upvote 0 Downvote
sample data: myDateField 3/10/2006 3/11/2006 3/12/2006 3/13/2006 3/14/2006 sql: SELECT Table1.myDateField FROM Table1 WHERE (((Table1.myDateField)>Date()-5 And (Table1.myDateField)<Date()-1)); output: myDateField 3/10/2006 3/11/2006 3/12/2006
Mar 14, 2006 #4 OhioSteve MIS Mar 12, 2002 1,352 US key point: You want to say "It is greater than five days before today. It is less than yesterday." That translates to this in the criteria row in query design view: >Date()-5 And <Date()-1 Upvote 0 Downvote
key point: You want to say "It is greater than five days before today. It is less than yesterday." That translates to this in the criteria row in query design view: >Date()-5 And <Date()-1
Mar 14, 2006 Thread starter #5 patrichek MIS Nov 18, 2003 632 US thanks steve, but i'm embarrased i even posted this! i came up with "between date()-2 and date()-4" sometimes i scare myself! Upvote 0 Downvote
thanks steve, but i'm embarrased i even posted this! i came up with "between date()-2 and date()-4" sometimes i scare myself!
Mar 14, 2006 #6 Golom Programmer Sep 1, 2003 5,595 CA I don't understand where you're having a problem. If you know that date()-2 and date()-3 work, wouldn't you be tempted to try date()-4? Perhaps you could expand on what you're trying to accomplish. Upvote 0 Downvote
I don't understand where you're having a problem. If you know that date()-2 and date()-3 work, wouldn't you be tempted to try date()-4? Perhaps you could expand on what you're trying to accomplish.