Criteria for range of date

G

Guest

Some help please. I am trying to query a range of dates, but because the
date is formatted date time I am using datevalue to query the date part. How
do I structure the criteria to allow the user to input a range of date. I
have attempted the following, but this does not work. Any help / suggestions
would be greatly appreciated

SELECT [Confirmations].Subject, [Confirmations].From,
[Confirmations].Received, DateValue([Received]) AS [Date]
FROM [Confirmations]
WHERE (((DateValue([Received])) Between DateValue([received])=[enter date]
And DateValue([received])=[enter date]));
 
J

Joshua A. Booker

Jer,

If the feild received is in an access table of the type Date/Time, you can
forget about the formatting.

WHERE [Received] Between [Enter Start Date] And [Enter End Date]


HTH,
Josh
 
T

Tom Ellison

Dear Jer:

ALMOST!!!!

How about:

SELECT Subject, From, Received, DateValue([Received]) AS [Date]
FROM [Confirmations]
WHERE DateValue([Received]) Between DateValue([enter beginning date])
AND DateValue([enter ending date])

Does this help?

Tom Ellison
 
G

Guest

Dear Tom
Works just fine
thanks a lot
--
thanks as always for the help
jer

Tom Ellison said:
Dear Jer:

ALMOST!!!!

How about:

SELECT Subject, From, Received, DateValue([Received]) AS [Date]
FROM [Confirmations]
WHERE DateValue([Received]) Between DateValue([enter beginning date])
AND DateValue([enter ending date])

Does this help?

Tom Ellison


jer said:
Some help please. I am trying to query a range of dates, but because the
date is formatted date time I am using datevalue to query the date part.
How
do I structure the criteria to allow the user to input a range of date. I
have attempted the following, but this does not work. Any help /
suggestions
would be greatly appreciated

SELECT [Confirmations].Subject, [Confirmations].From,
[Confirmations].Received, DateValue([Received]) AS [Date]
FROM [Confirmations]
WHERE (((DateValue([Received])) Between DateValue([received])=[enter date]
And DateValue([received])=[enter date]));
 

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