Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft Access > Re: Total short...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 6 of 8 Topic 30161 of 31596
Post > Topic >>

Re: Total short time fields in query

by Bob Quintal <rquintal@[EMAIL PROTECTED] > May 5, 2008 at 05:57 PM

Ecohouse <ecovindaloo@[EMAIL PROTECTED]
> wrote in
news:3d824645-d110-47a3-958d-170c4afa394a@[EMAIL PROTECTED]
 

> A field would have the value of 1:30.  This would represent one
> hour and thirty minutes.  I didn't set this up and now I'm stuck
> with it and trying to figure out a way to deal with this.
> 
> So I have to create re****ts where I will be grouping departments
> and I need the total hours and minutes.  I'm trying to do this
> using the query builder.  Any ideas?
> 

So you are talking of durations and not times. Access stores the 
date and time as the number of dats since Dec 31, 1899 and the 
fraction of the day reresents the time. e.g. noon is 0,5, 6:00 pm is 
0.75.

So first you need to determine if there is a hidden date in the 
field, then subtract that from the shown value, and total the 
fractions, then redisplay as as a duration.

If instead the time is stored in a text field, not date-time, you 
will need to write a function in Visual basic code to split the 
parts into a fraction of a day, then sum and reformat as a duration.

until anyone can give you specific instructions, we'll need to know 
1) the field type (open the table in design mode), 
2) the field format, 
3) if a datetime field, whether the dates are all 12-31-1899 or 
various recent dates, build a query and format the field as general 
date. 

Q






> On May 5, 4:25 am, "Fred Zuckerman" <Zuckerm...@[EMAIL PROTECTED]
>
> wrote: 
>> "Ecohouse" <ecovinda...@[EMAIL PROTECTED]
> wrote in message
>>
>> news:3476a795-6e48-4aad-8f80-
c34a494b6d3b@[EMAIL PROTECTED]
>> .com... 
>>
>> > I'm working on a project that was dropped in my lap.  It is in
>> > Access 2003.  There are short time fields which get calculated
>> > values (eg. 1:30).  But I will need to total up those values
>> > for re****ts in qiueries.  When I tried to drop one of the
>> > fields in the query builder 
> 
>> > and used the total function the totals was way off.
>>
>> > So I was wondering what would be the best way to do this?
>> >  Thanks in advance for the help.
>>
>> I'm confused, when you say "there are short time fields" do you
>> mean a fie 
> ld
>> containing values like 3:30pm, 4:00pm, 12:14am, etc? Or do you
>> mean a fiel 
> d
>> containing values of elapsed time like 1.20 secs, 5.50 hrs, etc.
>> The forme 
> r
>> is formatted as date/time, the latter is a number. A summation of
>> the form 
> er
>> doesn't make sense, but the summation of the latter does.
>> Fred Zuckerman
> 
> 



-- 
Bob Quintal

PA is y I've altered my email address.
** Posted from http://www.teranews.com
**
 




 8 Posts in Topic:
Total short time fields in query
Ecohouse <ecovindaloo@  2008-05-04 14:18:52 
Re: Total short time fields in query
"KC-Mass" <c  2008-05-04 18:01:21 
Re: Total short time fields in query
Ecohouse <ecovindaloo@  2008-05-04 15:17:35 
Re: Total short time fields in query
"Fred Zuckerman"  2008-05-05 01:25:46 
Re: Total short time fields in query
Ecohouse <ecovindaloo@  2008-05-05 04:49:51 
Re: Total short time fields in query
Bob Quintal <rquintal@  2008-05-05 17:57:40 
Re: Total short time fields in query
"KC-Mass" <c  2008-05-05 08:29:59 
Re: Total short time fields in query
Ecohouse <ecovindaloo@  2008-05-06 06:00:38 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 11:35:35 CST 2008.