query to Count the days

hinser13

Registered User.
Local time
Today, 00:56
Joined
Aug 8, 2010
Messages
75
I want a field to site next to a date field, to display the age of a quote as a number of days.

What crireia do I use to count how old a quote is and display this is a number.

I suppose its something like = count([Date Quote sent]) and somehow include the now date!
 
A date is just stored as a number where the number 1 is one day, so to get the number of days between dates you can just do a subtraction. Try this in the immediate pane ...
Code:
? date() - cdate("11/1/10")
VBA also has two functions DateAdd() and DateDiff() that are pretty handy if you want to do math with months or seconds or other sized slices of time.
Cheers,
PS: the date() function returns today's date
 
Code:
Date()-[Date Quote sent]

or

Code:
DateDiff("d", date(), [Date Quote sent])
 

Users who are viewing this thread

Back
Top Bottom