querying date/time

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Some help please. If a field is formatted as date/time, e.g, 2/23/2006
10:33, how do I query just the date portion, I have tried entering the date
in the criteria but the query returns no records.
 
Dear Jer:

Use the DatePart function to extract only the date portion of a date/time
column.

Tom Ellison
 
Multiple methods:

Simplest
Add a calculated field using the DateValue function to get just the date and
apply the criteria against that

Better (especially with large sets of data) use a range to get the data
Field: DateTimeField
Criteria: >= #1/23/2006# AND < #1/24/2006#
 
Back
Top