Time - Time formatting

G

Guest

HI, Does anyone know how to format a text field in a form so that it shows a
time - time format? For example 9:00 a.m. - 10:00 p.m.?

Current I have 09:00" - "09:00\ >LL;0;_ as the input mask and the format set
at medium time. My data appears as 09:00 AM - 10:00 PM

What I am hoping to fix is not having a zero appear before a single digit
time (9:00 as an example) as well as having the AM/PM in lower cases.

Any help would be so appreciated!!
 
J

John W. Vinson

HI, Does anyone know how to format a text field in a form so that it shows a
time - time format? For example 9:00 a.m. - 10:00 p.m.?

Current I have 09:00" - "09:00\ >LL;0;_ as the input mask and the format set
at medium time. My data appears as 09:00 AM - 10:00 PM

What I am hoping to fix is not having a zero appear before a single digit
time (9:00 as an example) as well as having the AM/PM in lower cases.

Any help would be so appreciated!!

Time formats apply only to Date/Time fields. A text field is NOT a date/time
value, and Date/Time formats won't work at all.

I'd *really* suggest using two date/time fields, TimeStart and TimeEnd say, so
that you can make use of the built in date/time formatting, use the data in
the fields for searching and sorting, etc. Storing the data in a Text datatype
*JUST* stores strings of characters - Access cannot recognize them as being
times nor apply date and time logic to them.

John W. Vinson [MVP]
 
G

Guest

Thanks John for the information but I am confused as to why you say the time
format wont work in a text field yet mine does? Did I stumble upon something?
 
J

John W. Vinson

Thanks John for the information but I am confused as to why you say the time
format wont work in a text field yet mine does? Did I stumble upon something?

It's probably going through two or three layers of automatic conversion trying
to help you. I bet you're formatting only the first "time like" value, not the
second.

Otherwise I don't know *what* might be going on.

John W. Vinson [MVP]
 

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