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 » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Time calculation



 
 
Thread Tools Display Modes
  #1  
Old January 21st, 2010, 12:46 PM posted to microsoft.public.access.queries
Tia[_3_]
external usenet poster
 
Posts: 126
Default Time calculation

Hello,
I am working on the employee attendance data entry the time in and out
are based on short time format
i have created a report sorted by employee ID and by making the sum of
total hours per day in order to get how many wrking hours each
employee have im getting a wrong calculation
Example
ID Employee date totalk wrking hours
1 Tia 1/1/2010 16:00
1 Tia 1/1/2010 16:00
1 Tia 1/1/2010 16:00
1 Tia 1/1/2010 16:00
1 Tia 1/1/2010 16:00
1 Tia 1/1/2010 16:00
1 Tia 1/1/2010 16:00
1 Tia 1/1/2010 16:00
1 Tia 1/1/2010 15:45
1 Tia 1/1/2010 16:00
=Sum([UMWORKINGPERDAY]) 15:45
FORMAT SHORT TIME
WHAT I SHOULD GET IS 159:45:00
hOW CAN I MAKE THE CALCULATION

tHANK YOU IN ADVANCE
  #2  
Old January 21st, 2010, 02:29 PM posted to microsoft.public.access.queries
vanderghast
external usenet poster
 
Posts: 593
Default Time calculation

Try:


= Int(SUM(UMWORKINGPERDAY) * 24) & Format( SUM(UMWORKINGPERDAY) ,
":nn:ss" )


Vanderghast, Access MVP


"Tia" wrote in message
...
Hello,
I am working on the employee attendance data entry the time in and out
are based on short time format
i have created a report sorted by employee ID and by making the sum of
total hours per day in order to get how many wrking hours each
employee have im getting a wrong calculation
Example
ID Employee date totalk wrking hours
1 Tia 1/1/2010 16:00
1 Tia 1/1/2010 16:00
1 Tia 1/1/2010 16:00
1 Tia 1/1/2010 16:00
1 Tia 1/1/2010 16:00
1 Tia 1/1/2010 16:00
1 Tia 1/1/2010 16:00
1 Tia 1/1/2010 16:00
1 Tia 1/1/2010 15:45
1 Tia 1/1/2010 16:00
=Sum([UMWORKINGPERDAY]) 15:45
FORMAT SHORT TIME
WHAT I SHOULD GET IS 159:45:00
hOW CAN I MAKE THE CALCULATION

tHANK YOU IN ADVANCE


  #3  
Old January 21st, 2010, 02:33 PM posted to microsoft.public.access.queries
Duane Hookom[_4_]
external usenet poster
 
Posts: 316
Default Time calculation

Points in time are generally stored in date/time fields. Durations should be
stored in a numeric field such as a double for hours or similar. Is there a
reason why you don't calculate your wrking hours as actual hours and not a
point in time? Typically you would use the DateDiff("n",[Start],[End])
function to get the number of minutes worked. You can easily sum this and
divide by 60 to get hours. There are lots of answers on the web that show
how to convert hour values like 8.5 to look like 8:30. Again, 8.5 hrs seems
more descriptive than the time 8:30 which is about 1/2 hour later than I am
expected to arrive at work.

Duane Hookom
MS Access MVP

"Tia" wrote in message
...
Hello,
I am working on the employee attendance data entry the time in and out
are based on short time format
i have created a report sorted by employee ID and by making the sum of
total hours per day in order to get how many wrking hours each
employee have im getting a wrong calculation
Example
ID Employee date totalk wrking hours
1 Tia 1/1/2010 16:00
1 Tia 1/1/2010 16:00
1 Tia 1/1/2010 16:00
1 Tia 1/1/2010 16:00
1 Tia 1/1/2010 16:00
1 Tia 1/1/2010 16:00
1 Tia 1/1/2010 16:00
1 Tia 1/1/2010 16:00
1 Tia 1/1/2010 15:45
1 Tia 1/1/2010 16:00
=Sum([UMWORKINGPERDAY]) 15:45
FORMAT SHORT TIME
WHAT I SHOULD GET IS 159:45:00
hOW CAN I MAKE THE CALCULATION

tHANK YOU IN ADVANCE


 




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 04:55 PM.


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