Time format different in the query than the original table

M

Miki

Hi,
I have time in a table in 24hr format, then when I run a query on that table
it gives time to me in AM/PM format,
this is annoying, is there a way for me to make the query show 24hr format
too?
e.g. I want 14:20 not 2:20pm

cheers
Miki
 
R

Rick Brandt

Miki said:
Hi,
I have time in a table in 24hr format, then when I run a query on that
table it gives time to me in AM/PM format,
this is annoying, is there a way for me to make the query show 24hr format
too?
e.g. I want 14:20 not 2:20pm

Format properties do not propagate. They affect the display (not the
storage) of a field when you look at that object in the GUI. They mean
nothing to forms, reports, and queries that consume the same data.
 
M

Miki

Thanks Ken, I can't find a place to put hh:nn though?
if I right click on the column I want to change in design view, and click on
format, I get :
General number
currency
Euro
Fixed
Standard
Percent
and
Scientific
as my options only??
how do I find where to put hh:nn
"KenSheridan via AccessMonster.com" wro

thanks again for your help!

Miki

te:
 
M

Miki

oops, I was right clicking the wrong field,
I right clicked the correct field and tried hh:nn and clicking "short time"
neither worked, it still shows:
1:00:00 PM etc
could the problem be that the field is calculated?
e.g. instead of being "Q1" it's Time1T: IIf(NZ([Q1])>0,[Time1],"NA") in the
"field section?

thanks again for your help

Miki
 
J

John W. Vinson

could the problem be that the field is calculated?
e.g. instead of being "Q1" it's Time1T: IIf(NZ([Q1])>0,[Time1],"NA") in the
"field section?

Yes. Since one of the IIF options is a text string, the calculated field is of
Text type - *not* Date/Time type.

Try

Time1T: IIf(NZ([Q1]) > 0, Format([Time1], "hh:nn"), "NA")

so it's a text string either way.
 

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