473,504 Members | 13,601 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Sum Time Difference in report

17 New Member
I am currently working on creating a Clock in/out form for our work place. I have the form done but the only way that I can get the time differences to work properly is to leave the Total time for the day worked as a text field. If I change this field to a number or hh:mm it rounds up to the nearest hour and I don't want this. It needs to be as if some one clocked in at 0800 and out at 2030 the time total would reflect 12.50. I got it to do this by leaving the field as a text, but when I try to generate a report with several days of info on it it returns an error. I am using the code.

Total.Value =([Time out] - [Time in]) *24
this is for me to get the total for the day. If I do this anyother way it is returning a single number rounded to the next hour.

In my report I created an unbound text box named Total and have it's control set to =SUM([Total]

Can anyone help.
Thanks
Apr 11 '08 #1
3 2203
MindBender77
234 New Member
I just did a project a few weeks ago similar to yours. Try this, it might produce the result your looking for:

Expand|Select|Wrap|Line Numbers
  1. TimeDifference: DateDiff("s",[LogIn Time],[LogOut Time])/3600
  2.  
Translation: Show the date difference between LogIn Time and LogOut Time in seconds and divide by 3600 to produce hours.

Bender
Apr 11 '08 #2
mdpems
17 New Member
I tried this and I am getting the same results. I plugged in my data that someone would clock in at 0745 and Clock out at 2030. What I want is for it to return 12.75. I can get it to do this if I go into the table and set the field to "text". If I set the field to "number" it rounds the number up to the next whole number not as the decimal. I can't get it to add these values together in the text field. Any help
Thanks
Apr 12 '08 #3
mdpems
17 New Member
Stupid me. I was putting my total formula in my report in the wrong place. I was putting it in the page footer instead of the report footer. Moved the formula and worked fine. Thanks.
Apr 12 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
5183
by: engsol | last post by:
I'm using Python to parse a bunch of s/w test files and make csv files for later report generation by MS ACCESS....(my boss loves the quick turn-around compared to C). Each log file may contain one...
5
4115
by: mas | last post by:
I have a Stored Procedure (SP) that creates the data required for a report that I show on a web page. The SP does all the work and just returns back a results set that I dump in an ASP.NET...
6
3736
by: cournape | last post by:
Hi there, I have some scientific application written in python. There is a good deal of list processing, but also some "simple" computation such as basic linear algebra involved. I would like to...
4
4217
by: Mark Reed | last post by:
Hi all, I have a query (query1) which shows scan date, scan time & operator. One scan = 1 record. What I want to do is create a report based on query 2 from query1 which shows all the scans AND...
4
2629
by: qtip | last post by:
I have a simple table the has First Name , Last Name, SSN, Date&Time. I have a report that will show all this information but I would like to put in at calculation to tell the difference between 2...
2
2734
by: Viviana R via AccessMonster.com | last post by:
I'm tryin to calculate de difference of time between different records and fields. I have a Report with date, time In, and Time Out fields. EX: Date Time IN Time Out 4/12/05 12:10...
4
2574
by: PawelR | last post by:
Hello Everyone Sorry but my English is very littel. In my application I use Crystal Reports. On report I have (in one row) to dateTime. How in 3th column calculate difftime beetwen this value and...
11
5544
by: chopsnsauce | last post by:
Here's the example: Dim frm As New FORM1 Try frm.show Catch ex As Exception msgbox ex.message
10
3348
by: Drum2001 | last post by:
I have designed a "Time Tracker Database"... Basically a Time Clock. I have report that calculates the number of regular hours worked per week. Currently I am running the following query: ...
0
7213
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7298
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7471
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5610
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4698
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1526
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
754
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.