1355 is 24 hour time and does not use AM and PM.
I think what you want is this --
IIf(Left([time],2)<12,Left([time],2) & ":" & Right([time],2) & "
A",Left([time],2)-12 & ":" & Right([time],2) & " P")
JanetF said:
Duane,
I'm working with unfamiliar data which won't end up in a form or a
report.
It's a query that I'm running and will eventually export to create a
fixed
format file. I thought the date format was HH:MM but it's actually a
text
field and users enter just four numbers such as 0400 or 1355. I need
it to
look like 04:00 A or 13:55 P. What you gave me just gives back 12:00 A
for
every record.
thanks,
Janet
:
I usually format values in controls on forms or reports, however you
can
use:
Format([UnnamedTimeField], "HH:MM A/P")
--
Duane Hookom
MS Access MVP
--
Hello,
I would like to show in a query the time formatted to look like:
HH:MM A or P
In other words I want to show hours and minutes followed by an A if
it's
AM
or a P if it's PM. Can anyone help? Thanks in advance.
Janet