Solved

Time Formatting  Access 2003 Form

Posted on 2013-05-15
7
351 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
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 - Access MVP) 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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

Suggested Solutions

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…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

776 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