D depawl Registered User. Local time Today, 12:46 Joined May 19, 2007 Messages 144 Mar 21, 2008 #1 I trying to create a query that just returns all of the records in my database for the past year. I've tried to somehow do it using the date() function but haven't had much luck yet. Any help is most appreciated.
I trying to create a query that just returns all of the records in my database for the past year. I've tried to somehow do it using the date() function but haven't had much luck yet. Any help is most appreciated.
pbaldy Wino Moderator Staff member Local time Today, 09:46 Joined Aug 30, 2003 Messages 36,157 Mar 21, 2008 #2 There are some date functions here that should prove useful: http://www.pacificdb.com.au/MVP/Code/Dates.htm
There are some date functions here that should prove useful: http://www.pacificdb.com.au/MVP/Code/Dates.htm
R raskew AWF VIP Local time Today, 11:46 Joined Jun 2, 2001 Messages 2,731 Mar 22, 2008 #3 Try these in the criteria cell of your date field: For a full year back from today's date: between dateadd("yyyy", -1, date()) and date() For the current year: between dateserial(year(date()),1,1) and date() HTH - Bob
Try these in the criteria cell of your date field: For a full year back from today's date: between dateadd("yyyy", -1, date()) and date() For the current year: between dateserial(year(date()),1,1) and date() HTH - Bob
D depawl Registered User. Local time Today, 12:46 Joined May 19, 2007 Messages 144 Mar 22, 2008 #4 Thanks guys. As far as I can see right now, this function in the criteria of the date field seems to work: >Date()-365 Appreciate the help. Dennis
Thanks guys. As far as I can see right now, this function in the criteria of the date field seems to work: >Date()-365 Appreciate the help. Dennis