Link to home
Start Free TrialLog in
Avatar of mickeyshelley1
mickeyshelley1Flag for United States of America

asked on

Time Formatting Access 2003 Form

In the code below the value of Forms!communications!Received is formatted as 24hr format but when the value is passed to Forms!communications!Message it is displaying as regular time (12Hr). How can i get it to show up in 24 hr time in the message field sam as it displays in the Forms!communications!Received



Forms!txtMessage = "Run Information " & " " & "Time Rec =" & " " & Forms!communications!Received 

Open in new window

SOLUTION
Avatar of pjevin
pjevin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry I meant "hh:nn:ss" in my snippet, not ss twice... mm is month, not minute.
Actually .... either one works;

?format(Time,"HH:nn:ss")
11:26:30

?Format(time,"HH:mm:ss")
11:13:02

which is surprising ...

In Regional settings it's mm

User generated image
Well that's amusing, apparently it uses m as minute or month based on context.

Format(Now(),"yymm yy:mm hhmm hh:mm mm nn")
Displays: 1305 13:05 1433 14:33 05 33

I'm in EDT obviously, but regardless, definitely not hh:ss:ss as I typed initially...
Have to say ... in 20 year, I've never noticed that mm works (I don't think). Although I know in Regional settings it uses mm for minutes and MM for months.

?format(Time,"HH:MM:ss")
11:49:47

Seriously, lOL ...

Yes, apparently all about context.