Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access_asp thread: Date function in asp


Message #1 by "Brendan O'Grady" <9843922@s...> on Tue, 19 Mar 2002 16:12:32
Hi
 I have a field in a database which contains the date the data was entered,
 Is it possible to take a count of the number of fields that has been 
entered in the last 24 hours?
 
thanks
Brendan
Message #2 by "Ken Schaefer" <ken@a...> on Wed, 20 Mar 2002 13:19:18 +1100
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Brendan O'Grady" <9843922@s...>
Subject: [access_asp] Date function in asp


: I have a field in a database which contains the date the data was entered,
: Is it possible to take a count of the number of fields that has been
: entered in the last 24 hours?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

SELECT
    Count(DateField)
FROM
    Table
WHERE
    DateField >= DateAdd("h", -24 Date())

(or something similar - check your Access documentation)

Cheers
Ken


  Return to Index