querying date/time

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.
 
T

Tom Ellison

Dear Jer:

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

Tom Ellison
 
J

John Spencer

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#
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top