473,394 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Difference Between Two Number Fields

Hi All,
I need to create a query that will look at two fields containing numbers, and give me the difference between the two. I have found alot of info for comparing two dates, but not simple numbers.
The two fields are "Minutes Booked" and "Actual Minutes Used"
Just an insight, this is for a surgeon booking an operating room, and how long they were actually in there, both in minutes as a whole number.
i.e. Minutes Booked: 30
Actual Minutes Used: 20
the difference would be +10 minutes.
and if the numbers were reversed, the difference would be -10 minutes.
I would greatly appreciate any help you can give.
Thank you in advance.
Dec 10 '08 #1
3 17085
DonRayner
489 Expert 256MB
In query builder
Expand|Select|Wrap|Line Numbers
  1. TimeDiff: [Minutes Booked] -  [Actual Minutes Used]
  2.  
Where TimeDiff is whatever name you want and the other two are the actual names of your fields in the table.

Or you can do the calculation directly on your report or form by setting the control source to of an unbound text box to
Expand|Select|Wrap|Line Numbers
  1. =[Minutes Booked] -  [Actual Minutes Used]
  2.  
Using the actual names of the controls on the form/report.
Dec 10 '08 #2
You know, sometimes things are so simple, that you tend to overthink it.
Thanks for your help, it worked great.



@DonRayner
Dec 10 '08 #3
DonRayner
489 Expert 256MB
Glad I could help, and we all have days like that ;)
Dec 10 '08 #4

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

Similar topics

3
by: CSDunn | last post by:
Hello, I have a situation with MS Access 2000 in which I need to display report data in spreadsheet orientation (much like a datasheet view for a form). If you think of the report in terms of what...
5
by: WindAndWaves | last post by:
Greetings once more, I was wondering if someone figured out the difference between attributes and properties. I noticed that things like fields have a number of properties, but also...
1
by: Tony Williams | last post by:
I have a table with two fields, txtvalue (a number field) and txtmonth ( a date/time field). I want to create a report that shows the difference in value between the value in txtvalue in one value...
4
by: Yotam | last post by:
Hi, I need some help with JS. I will be grateful, if you can help me out. I have two date fields (check in, check out) and "number of days" field. I want the script to calculate automatically...
9
by: HC | last post by:
Hello, all, I started out thinking my problems were elsewhere but as I have worked through this I have isolated my problem, currently, as a difference between MSDE and SQL Express 2005 (I'll just...
5
by: cecil | last post by:
Hi All, I have a report sectioned/grouped by year with number fields (i,e attendance). I would like to calculate percent difference of attendance for each year. Thanks in advance, Cecil
3
by: Steve | last post by:
I am trying to calculate elapsed travel times for flights. My plan is to enter the local departure time, the departure city and the local arrival time and city. These times would be standardised...
15
by: student4lifer | last post by:
Hello, I have 2 time fields dynamically generated in format "m/d/y H:m". Could someone show me a good function to calculate the time interval difference in minutes? I played with strtotime() but...
4
by: Quizzed | last post by:
Hi, Using MS Access 97, i have a query over an As/400 which returns a number of fields. Within each record returned, two fields are of numeric data type but contain values relating to time. The...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...

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.