Thread: Formula Meaning
View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.misc
Bevatron
 
Posts: n/a
Default Formula Meaning

Thank you Hank. I think I begin to see. Your response brought to my
attention that I am in the Excel discussion and I should be in the Access
discussion group. No wonder Dave thought I was nuts. I AM. Sorry.

Bev

"Hank Scorpio" wrote:

On Fri, 6 Jan 2006 11:51:02 -0800, "Bevatron"
wrote:

The following formula, <=Date()-30, produces a query telling me which
documents in my database have been in my office for review for longer than 30
days. They are dated in and dated out, and when I date them out they
disappear from my "Over 30 Day List". I didn't create this particular query
myself, and I don't know what the () represents. I understand greater than
and equal to. Since the result is documents OVER 30 days, the -30 is
puzzling to me as well. Any help would be greatly appreciated.


Date() is a function which returns the current date... but not in
Excel, which is where some confusion may arise.

If I can over-simplify a bit, a function is generally an expression
that you feed values into, and which then returns another value which
is calculated from those inputs. Think of it as a black box into which
you feed some numbers or text, and some calculated numbers or text are
returned to you.

Typically the input arguments contained within the brackets. The most
common one that people experience is =SUM; =SUM(A6:A8), for example,
calculates the sum of the cells A6, A7 and A8.

However there are some functions that you don't need to feed anything
to. They simply return a value.

In a database (like Access, say), the function
=Date()
returns the current system date. The brackets remain because it's
still a function, but they don't contain anything because the function
needs no arguments.

(Confusion can arise because that's NOT what the Excel =Date()
function does. The Excel function needs 3 arguments; Year, Month and
Day. It will then return the date value for the date that you've
specified, rather than the current date. =Today() does in Excel what
=Date() does in Access.)

It helps to realise that dates are stored as numeric values. In Excel,
for instance, the current date is also the number 38724. Subtract 30
from that and you get 38694, which Excel can also interpret as
08-Dec-05.

So what the expression you're using is saying to the source database
is, "show me the records where the field value is less than:
(the current date, minus 30 days)
".
In other words, where that date is more than 30 days ago.

---------------------------------------------------------
Hank Scorpio
scorpionet who hates spam is at iprimus.com.au (You know what to do.)
* Please keep all replies in this Newsgroup. Thanks! *