partial cell value query by date range?

P

Peter Mcc

I want to be able to querry by date range. However, the date values are in
this format in my table, "4/17/2008 8:45:11 PM" I do not want to querry be
time but by dates only. I tried querry by date and got zero results due to
the time being a part of the cell. I changed the format to "short date" in
the table but, while not shown, the info is still there and throwing off the
query. These date cells are being auto filled by an outside program that
doesn't allow the removal of the time from the date value when it enters into
Access. So what I need to do a partial cell value query by date range. I am
new to access. Is this possible? How?
 
J

Jerry Whittle

First off, Access does not have cells like a spreadsheet. It has records and
fields.

You are very correct about the format of a date, or number for that matter,
and what is actually stored. Formatting just makes what is stored look
different.

In fact Dates in Access are actually stored as numbers. For example
4/17/2008 2:35:12 PM is actually stored as 39555.6077777778.

So to FINALLY answer your question, use a between statement that will cover
the date and time. For example you could use the following criteria to find
something on today's date:

Between Date() and Date() + .99999
 
P

Peter Mcc

Thanks, I'm new but this helps.

Jerry Whittle said:
First off, Access does not have cells like a spreadsheet. It has records and
fields.

You are very correct about the format of a date, or number for that matter,
and what is actually stored. Formatting just makes what is stored look
different.

In fact Dates in Access are actually stored as numbers. For example
4/17/2008 2:35:12 PM is actually stored as 39555.6077777778.

So to FINALLY answer your question, use a between statement that will cover
the date and time. For example you could use the following criteria to find
something on today's date:

Between Date() and Date() + .99999
 

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