time query

K

kathy

Will Access accept military time on the criteria line of a
query?

When I enter <#14:00#

Access changes it to <#2:00:00 PM#

Regardless of how it is identified in the table, short
date, medium date...

Can anyone help?
 
K

Ken Snell [MVP]

Even though ACCESS "changes" what is displayed, your query should return the
same results ... what you're wanting to do is the "format" of the way the
time is displayed, which has nothing to do with how the time is stored (a
decimal number between 0 and 1 representing the fractional part of a 24-hour
day). So ignore that ACCESS changed the display and continue on your
successful ways!
 
T

Tom Ellison

Dear Kathy:

It is first important to recognize that the database does not "store"
the time an any format. Your question is properly about how the time
is displayed, not how it is stored. The way it is stored is
compatible with many ways of displaying that value. So, Access has
not "changed" it to 2:00:00 PM, it has just displayed it that way.

To get it to display otherwise, you can have it formatted in a large
number of ways. In specifying a format for display, please refer to
the online help for the Format function. It includes this:

h Display the hour as a number without leading zeros (0 – 23).
Hh Display the hour as a number with leading zeros (00 – 23).

Clearly you can specify ways to display the hour portion of your
date/time values using a 24 hour clock.

Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
 
Top