[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Minor Time format problem

Posted on 2004-08-02
18
Medium Priority
?
321 Views
Last Modified: 2010-05-18
I have a bunch of places in my database where Date/Time format is set to Short Time and input mask is also Short Time.  It is showing 1pm as 13:00 and 4am as 4:00 (no leading zero).  How do I make it show the leading zero for times before noon?
0
Comment
Question by:bastille2
[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
  • 11
  • 6
18 Comments
 

Author Comment

by:bastille2
ID: 11700228
Flavo,  If you're reading this - I only noticed the problem because YOUR time formatting DOES show the leading zero...and I like it.  Bob
0
 
LVL 34

Expert Comment

by:flavo
ID: 11700249
You said before you have an input mask in your table?? is that right??  what are you setting in the table??

You can set the format in the table (in design mode) and sleect "short time" form the list

Dave
0
 

Author Comment

by:bastille2
ID: 11700260
Format "Short Time"  Input mask "00:00;0;_" for the field.  Do you mean that it can be set for the table as a whole?
0
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
LVL 34

Expert Comment

by:flavo
ID: 11700280
The help says "hh:nn" will show 00:00, but it doesnt. (not at least with XP)

I even changes right back the short time once i enter it.

Maybe a bug, ill invesigate.

Going off the documnetation, it should show leading zeros.

0
 
LVL 34

Expert Comment

by:flavo
ID: 11700308
http://support.microsoft.com/default.aspx?scid=kb;en-us;130514

Says that hh:nn should work, i cant get it working.  may work in older (A97 / 2000) but cant say for sure.  I use A97 at work and im sure it works.

Dave
0
 
LVL 34

Expert Comment

by:flavo
ID: 11700311
when i use hh:nn it  still shows 6:00, even with the input mask 00:00;0;_ and add the zero, it just gets rid of it.
0
 

Author Comment

by:bastille2
ID: 11700330
As a fallback position, is there an 'easy' way to make your code show without the leading zero?  It would be nice to have them all 00:00 but 0:00 wouldn't kill me as long as it was consistent throughout the database.  If it would mean more ((('s and))))))'s I'm willing to leave well enough alone.
0
 
LVL 34

Assisted Solution

by:flavo
flavo earned 500 total points
ID: 11700341
Try changing "short date" to "h:nn"  (no need to play with ()()()()()(()))

Dave
0
 
LVL 34

Expert Comment

by:flavo
ID: 11700342
not "try changing"

Change (does work)

Dave
0
 
LVL 34

Expert Comment

by:flavo
ID: 11700347
I would still like to know why with a query it returns 01:00, while when you set it to a table, it returns 1:00.

The mind boggles sometimes.....
0
 

Author Comment

by:bastille2
ID: 11700391
When you say "Short Date", do you mean "Short Time"?
0
 
LVL 34

Expert Comment

by:flavo
ID: 11700396
Yes sorry, replace "short time" with "h:nn"

Dave
0
 
LVL 34

Expert Comment

by:flavo
ID: 11700398
{and yes it is h:nn not h:mm}

m = month
n = minutes

Dave
0
 
LVL 16

Accepted Solution

by:
GreymanMSC earned 500 total points
ID: 11700399
It reflects your computer's Regional and Language options (formerly known as the International Settings). Which it bloody well shouldn't!
 
Silly Access XP is just trying to be helpful, but this is annoying.  If you tell Access that you wish to display time with leading zeros, or not, it should do so reguardless of the international settings.
 
Go to (Windows Taskbar) Start > Settings > Control Panel > Regional And Language Options.
 
On the Regional Options tab, click the Customize button. On the Time tab of the next form, the Time format will probably look like: h:mm:ss tt so change it to hh:mm:ss tt and voila, the hh:nn format will be displayed with leading zeros.
0
 
LVL 34

Expert Comment

by:flavo
ID: 11700407
So why does query format(....,"short time") work and not table??

Doesnt really help if you distrubute your app.  (although im sure there would be an API somewhere to change it)

Nice to see they make things "easy" for use these days... jerks!!
0
 

Author Comment

by:bastille2
ID: 11700411
Thank you GreymanMSC.  Would anyone else like to offer a comment on this fix before I implement it?
0
 

Author Comment

by:bastille2
ID: 11700424
Good point Flavo.  If the regional settings are only going to affect my laptop, it won't help all the people who will be using the database on their machines.  It may be best to leave it alone.
0
 
LVL 34

Expert Comment

by:flavo
ID: 11700447
Im not one of those i hate everything MS just because its MS people, but
%$^$%!!!!
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
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 …

656 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