Time format: 0###

C

CatQM

I have imported data into Access with 24 hr clock times (just numbers, no
formatting). My times before 1200 do not have a leading zero. For example
I have 300 instead of 0300. How can I add this needed zero in a query? --
Cat
 
J

Jeff Boyce

Take a look at the format property for the field in the table. Or the
Format() function ... I'm remembering something like (untested):
hhmm

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
W

Wayne-I-M

Something like this should do - change to update Q

SELECT IIf([SomeTableName]![TimeField]<1000,0 &
[SomeTableName]![TimeField]\60 & Format([SomeTableName]![TimeField] Mod
60,":""00""")) AS NewTime
FROM SomeTableName;


The <1000 is just a guess as not sure what your data looks like - I assume
it's a number

Good luck
 

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