what does this mean?

T

Trentongg

I have a query with this criteria on a data field. <= Date()-4383
I know it's restricting the date but can you explain the formula please?

Thanks,
Trentrongg
 
J

John Spencer

It means that the date in the data field must be on or before today's date
minus 4,383 days. - which is 10/24/1995 (October 24, 1995 - 12 years ago).



--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..
 
K

Kathy

I have a query that I need to limit the dates from now minus 5 years. The
field is a Date/time with a format short date. I have entered into the
criteria <=Date()-1826 however it has no effect on my selections.
 
M

Michel Walsh

If you have nothing older than 1826 days before now, then no record would be
kept; else, only the records having a value for a data occurring before
today less 1826 days will be kept. If you want keep only the recent records,
use >= Date()-1826 instead of <=Date()-1826.

Vanderghast, Access MVP
 
R

raskew via AccessMonster.com

This all depends on what you are doing with Leap Years (2008, 2004)

? date()
12/22/2008

? dateadd("yyyy", -5, date())
12/22/2003

? dateadd("d", -1826, date())
12/23/2003

? dateadd("d", -1827, date())
12/22/2003

Bob
Thank you so much. I sometimes have a tendency to see things backwards.
If you have nothing older than 1826 days before now, then no record would be
kept; else, only the records having a value for a data occurring before
[quoted text clipped - 18 lines]
 
Top