Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Time Formatting  Access 2003 Form

Posted on 2013-05-15
7
Medium Priority
?
379 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 1000 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 1000 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
10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

 
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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

660 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