A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Time calculation



 
 
Thread Tools Display Modes
  #1  
Old January 25th, 2010, 10:10 AM posted to microsoft.public.access.forms
Tia[_3_]
external usenet poster
 
Posts: 126
Default Time calculation

Dear all,

I am calculation total working hours per day for each employee along
with total ovt
on daily basis i am making the data entry for the attendance and i am
getting the ovt as short time
example

Employee Date total working hours Total OVT
Tia Kareem 1/1/2010 12:00 3:00
Tia Kareem 2/1/2010 12:00 3:00
Tia Kareem 3/1/2010 12:00 3:00
Tia Kareem 4/1/2010 12:00 3:00
jason 1/1/2010 12:00 3:00
jason 2/1/2010 12:00 3:00
jason 3/1/2010 12:00 3:00

What i need is to know how much is the total OVT by employee
i have used the group and the sum but what i am getting is a different
total than the one i have
If i sum it and put the format as short time i will get 12:00 and what
i should get is
SELECT [JAN ATTENDANCE].Employee, Sum([JAN ATTENDANCE].ovtperday) AS
SumOfovtperday
FROM [JAN ATTENDANCE]
GROUP BY [JAN ATTENDANCE].Employee;

  #2  
Old January 25th, 2010, 11:44 AM posted to microsoft.public.access.forms
Douglas J. Steele[_3_]
external usenet poster
 
Posts: 3,143
Default Time calculation

The Date data time is intended for point-in-time values (i.e.: a specific
timestamp), not a duration. You'd be best off deciding the unit in which
you're interested (minutes? hours?) and storing the hours as a Long Integer
value in those units. You can always write your own function to format total
minutes to hh:nn.

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

"Tia" wrote in message
...
Dear all,

I am calculation total working hours per day for each employee along
with total ovt
on daily basis i am making the data entry for the attendance and i am
getting the ovt as short time
example

Employee Date total working hours Total OVT
Tia Kareem 1/1/2010 12:00 3:00
Tia Kareem 2/1/2010 12:00 3:00
Tia Kareem 3/1/2010 12:00 3:00
Tia Kareem 4/1/2010 12:00 3:00
jason 1/1/2010 12:00 3:00
jason 2/1/2010 12:00 3:00
jason 3/1/2010 12:00 3:00

What i need is to know how much is the total OVT by employee
i have used the group and the sum but what i am getting is a different
total than the one i have
If i sum it and put the format as short time i will get 12:00 and what
i should get is
SELECT [JAN ATTENDANCE].Employee, Sum([JAN ATTENDANCE].ovtperday) AS
SumOfovtperday
FROM [JAN ATTENDANCE]
GROUP BY [JAN ATTENDANCE].Employee;



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 05:26 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.