Time Format

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Quick question. I want to format a text box to read time with a format of
"h:mm", without am or pm.

For example, I would like to see 3:09 in my text box rather than 03:09:00 PM
or any other example imaginable.

Thanks,
 
Thanks for the response. When I do this, I am getting 16:05, for 4:05. Have
I done something wrong?
 
Mybe there is a better way, but you can try this

format(replace(FieldName,"pm",""),"h:nn")
 
Steve said:
Quick question. I want to format a text box to read time with a format of
"h:mm", without am or pm.

For example, I would like to see 3:09 in my text box rather than 03:09:00 PM
or any other example imaginable.


How about:

Format(IIf(Hour(timefield)>11,timefield-.5,timefield),"h:nn")
 
Back
Top