Solved

Time Formatting  Access 2003 Form

Posted on 2013-05-15
7
368 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 3

Assisted Solution

by:pjevin
pjevin earned 250 total points
ID: 39169069
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 - Microsoft MVP, Access and Data Platform) earned 250 total points
ID: 39169080
Forms!txtMessage = "Run Information " & " " & "Time Rec =" & " " & Format(Forms!communications!Received,"HH:mm:ss")
0
 
LVL 3

Expert Comment

by:pjevin
ID: 39169096
Sorry I meant "hh:nn:ss" in my snippet, not ss twice... mm is month, not minute.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 75
ID: 39169116
?Format(time,"HH:mm:ss")
11:13:02
0
 
LVL 75
ID: 39169154
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
ID: 39169173
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
ID: 39169227
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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

751 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