Solved

Time Formatting  Access 2003 Form

Posted on 2013-05-15
7
328 Views
Last Modified: 2013-05-15
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

0
Comment
Question by:mickeyshelley1
  • 4
  • 3
7 Comments
 
LVL 3

Assisted Solution

by:pjevin
pjevin earned 250 total points
Comment Utility
Forms!txtMessage = "Run Information " & " " & "Time Rec =" & " " & Format(Forms!communications!Received,"hh:ss:ss")

Open in new window

0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Access MVP) earned 250 total points
Comment Utility
Forms!txtMessage = "Run Information " & " " & "Time Rec =" & " " & Format(Forms!communications!Received,"HH:mm:ss")
0
 
LVL 3

Expert Comment

by:pjevin
Comment Utility
Sorry I meant "hh:nn:ss" in my snippet, not ss twice... mm is month, not minute.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 75

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
?Format(time,"HH:mm:ss")
11:13:02
0
 
LVL 75

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
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

1
0
 
LVL 3

Expert Comment

by:pjevin
Comment Utility
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...
0
 
LVL 75

Expert Comment

by:DatabaseMX (Joe Anderson - Access MVP)
Comment Utility
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.
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now