473,465 Members | 1,962 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Differences in record values

2 New Member
I have a table with interview times (start and end times), and I am trying to find the largest gap between the times. I would need a query that takes the difference of the start time of one interview and the end time of another. Is there a way to do this in VBA or a query??
May 25 '10 #1
4 1066
vb5prgrmr
305 Recognized Expert Contributor
If it was SQL Server... Okay, maybe a way... With SQL Server you can create a temporary table in memory, with access you would actually have to create a table with a select into. Either way, you would do the operation with the needed fields while appending a field. This appended field would allow you to store the difference between start/stop times and then you could select from that table with an order by.

As for the exact syntax, your best bet is to use your friends (yahoo, google, ask, answers, bing) to search for the database you are using plus forum (Access Forum). I do know over at tek-tips they have several different database forums but hopefully someone will come along with the knowledge as I need to have the SQL help files up for this kind of thing but they are on my server and I don't surf with my server...



Good Luck
May 26 '10 #2
QVeen72
1,445 Recognized Expert Top Contributor
Hi,

If you have stored the Start and EndTime in DateTime Fields, then you can simply subtract the two..

Select EndTime - StartTime From MyTable Order By
(EndTime - StartTime ) Desc

Regards
Veena
May 26 '10 #3
vb5prgrmr
305 Recognized Expert Contributor
shakes head, bows to the queen, then meekly asks, "What about an alias?

Select (EndTime - StartTime) As TimeDiff From MyTable Order By
(EndTime - StartTime) Desc

Sometimes the simplist of answers can be overworked...
May 26 '10 #4
dsatino
393 Contributor
Maybe I'm misreading this, but looks like student is trying to find the time difference between the start of the first interview and the end of the last interview...

student?
May 26 '10 #5

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

Similar topics

6
by: HD | last post by:
Hello. For the following, I would appreciate if anyone could tell me: if it can be done, how it might done, and/or what search terms I could use to find the solution myself. I would like to...
5
by: John | last post by:
Hi If I have a form open, what is the code that is equivalent to using the File->Print menu with select record(s) option to print the form with the currently displayed record values? Thanks ...
3
by: hazz | last post by:
if i have a table record called Rule 1 with 1. table name 2. table column name 3. operator (>,< =) 4. value (0 to n) 5. score how could I create code to create a rule automatically so...
3
by: Alexander Pucher | last post by:
Hi, given a table with some data, e.g. some monthly measures. Some of the measures are missing though. id m1 m2 m3 m4 m5 .... m12...
4
by: Francis | last post by:
Hello i have a continuos form, and i have a command button to help insert information on a control textbox. But when the text box is not null, i dont want the command button to show (to the current...
3
by: veaux | last post by:
I have a table that looks like below: Name, Address, Favorite Pet Bill Smith, 123 Smith St, Dogs Bill Smith, 123 Smith St, Cats The "Dogs" and "Cats" are actually in a lookup table, but have...
4
by: Julian Moorhouse | last post by:
Hi, I've been struggle with the code below. I've tried mysql_fetch_assoc and various other functions, but can't seem to get it to work. The code works as far as that point though. Any...
4
by: rdemyan via AccessMonster.com | last post by:
I have to import building information from another system. I've decided to keep track of each set of data downloaded by including a Download_Date. That way I keep historical data. My table has...
1
AaronL
by: AaronL | last post by:
Hello, First I would like to say thank you all for your help in the past. I am stumped again. I am creating an e-commerce system and I want to be able to upload images to the server and...
7
by: ghjk | last post by:
I have table which is clickable.When user click one record I want to call java script function and fill the form using selected values. This is my code and I can't understand what is going...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.