UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Date Display in Control as hh:mm:ss without AM PM, Office 2003    
 
   
cronk005
post Oct 5 2010, 01:19 PM
Post #1

UtterAccess Addict
Posts: 106
From: Saint Paul, Minnesota, USA



This seems like it should be an easy thing, yet it's driving me crazy.

When I type in the time (ie: it is an actual time elapsed that i'm entering), it end up getting AM PM.

How can I get this so that I enter in 1:24:24 to mean that the amount of time something took was 1 hour, 24 minutes, 24 seconds?

I've tried and succeeded in formatting it in a query, but i cannot alter the value when it is used as the datasource for a form.

Any thoughts on this?
Go to the top of the page
 
+
Jeff B.
post Oct 5 2010, 01:22 PM
Post #2

UtterAccess VIP
Posts: 8,170
From: Pacific NorthWet



You mentioning entering duration into a control. Is that control's underlying bound field an Access date/time field?

If so, be aware that Access date/time data type holds TIME OF DAY/DATE, not duration.
Go to the top of the page
 
+
cronk005
post Oct 5 2010, 02:43 PM
Post #3

UtterAccess Addict
Posts: 106
From: Saint Paul, Minnesota, USA



QUOTE (Jeff B. @ Oct 5 2010, 07:22 PM) *
You mentioning entering duration into a control. Is that control's underlying bound field an Access date/time field?

If so, be aware that Access date/time data type holds TIME OF DAY/DATE, not duration.


It is. What would be the best way to accomplish this so that I can measure duration appropriately?
Go to the top of the page
 
+
Jeff B.
post Oct 5 2010, 03:50 PM
Post #4

UtterAccess VIP
Posts: 8,170
From: Pacific NorthWet



A common approach to entering/using duration is to use a textbox. Since you are using numbers and expecting to do math, the underlying field needs one of the number-type data types defined.

Usually, you'd use the lowest unit of measure (i.e., if you need hours, minutes and seconds, store the number of seconds).

Then you'd need to use a small procedure to format the number (and/or the sum of those durations) in your preferred (?hh:mm:ss?) format. Check on-line, possibly at mvps.org/access for examples.
Go to the top of the page
 
+
cronk005
post Oct 12 2010, 02:34 PM
Post #5

UtterAccess Addict
Posts: 106
From: Saint Paul, Minnesota, USA



Hi Jeff-

I ended up creating 3 separate text boxes and labelling them hours, minutes and seconds to help me achieve what i wanted. I believe it might be a long way around the problem, but it is currently working... in my mind, it's a KISS solution.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 25th May 2013 - 02:57 AM