How do I query for a count of days since a specific date?

  • Follow


What I'm trying to do is display the number of days that have past since the 
last date (date/time format).  Is this possible?
0
Reply Utf 11/15/2007 1:56:00 PM

Use the DateDiff function:

DateDiff("d", [LastDate], Date())

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Antwan C" <Antwan C@discussions.microsoft.com> wrote in message 
news:28515340-E24B-45BF-B34F-BFF05833F5F8@microsoft.com...
> What I'm trying to do is display the number of days that have past since 
> the
> last date (date/time format).  Is this possible? 


0
Reply Douglas 11/15/2007 2:06:13 PM


Is there a calculation that can be used to automatically populate the current 
date as the end date?  I've heard of a get date function but am not familiar 
with it.

For example:

DateDiff("d", [LastDate], [get present date])

"Douglas J. Steele" wrote:

> Use the DateDiff function:
> 
> DateDiff("d", [LastDate], Date())
> 
> -- 
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no e-mails, please!)
> 
> 
> "Antwan C" <Antwan C@discussions.microsoft.com> wrote in message 
> news:28515340-E24B-45BF-B34F-BFF05833F5F8@microsoft.com...
> > What I'm trying to do is display the number of days that have past since 
> > the
> > last date (date/time format).  Is this possible? 
> 
> 
> 
0
Reply Utf 11/15/2007 2:38:07 PM

That's exactly what I gave you: to get the current date, you refer to the 
Date() function.

-- 
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


"Antwan C" <AntwanC@discussions.microsoft.com> wrote in message 
news:8B7CC546-8409-4C82-A258-46DA91F27847@microsoft.com...
> Is there a calculation that can be used to automatically populate the 
> current
> date as the end date?  I've heard of a get date function but am not 
> familiar
> with it.
>
> For example:
>
> DateDiff("d", [LastDate], [get present date])
>
> "Douglas J. Steele" wrote:
>
>> Use the DateDiff function:
>>
>> DateDiff("d", [LastDate], Date())
>>
>> -- 
>> Doug Steele, Microsoft Access MVP
>> http://I.Am/DougSteele
>> (no e-mails, please!)
>>
>>
>> "Antwan C" <Antwan C@discussions.microsoft.com> wrote in message
>> news:28515340-E24B-45BF-B34F-BFF05833F5F8@microsoft.com...
>> > What I'm trying to do is display the number of days that have past 
>> > since
>> > the
>> > last date (date/time format).  Is this possible?
>>
>>
>> 


0
Reply Douglas 11/15/2007 4:08:18 PM

3 Replies
904 Views

(page loaded in 0.069 seconds)

Similiar Articles:
















7/19/2012 6:01:04 PM


Reply: