Determine the time difference between two records

I have a report I'd like to generate that will tell me the time between each 
transaction in the database for a user, and the average time between 
transactions. I'm having trouble figuring out how to do this. The field in 
the table is called EntryStartTime. What I'd like to do is sort the start 
times in ascending order, determine the time difference between the first two 
records, and then continue to the second and third, third and fourth, etc. I 
have a feeling the answer is probably really simple, but my brain isn't 
working yet this morning. I'd like to try to avoid doing this with code if I 
can.
0
Utf
3/12/2008 3:14:02 PM
access 16762 articles. 3 followers. Follow

2 Replies
1014 Views

Similar Articles

[PageSpeed] 10

See:
    Subquery basics: Get the value in another record
at:
    http://allenbrowne.com/subquery-01.html#AnotherRecord

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Nicholas Scarpinato" <NicholasScarpinato@discussions.microsoft.com> wrote 
in message
news:A72D7427-287A-4DBB-9BCB-37CFD08153CB@microsoft.com...
>I have a report I'd like to generate that will tell me the time between 
>each
> transaction in the database for a user, and the average time between
> transactions. I'm having trouble figuring out how to do this. The field in
> the table is called EntryStartTime. What I'd like to do is sort the start
> times in ascending order, determine the time difference between the first 
> two
> records, and then continue to the second and third, third and fourth, etc. 
> I
> have a feeling the answer is probably really simple, but my brain isn't
> working yet this morning. I'd like to try to avoid doing this with code if 
> I
> can. 

0
Allen
3/12/2008 3:36:38 PM
A couple minor modifications and that worked perfectly. Thank you Allen.

"Allen Browne" wrote:

> See:
>     Subquery basics: Get the value in another record
> at:
>     http://allenbrowne.com/subquery-01.html#AnotherRecord
> 
> -- 
> Allen Browne - Microsoft MVP.  Perth, Western Australia
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
> 
> "Nicholas Scarpinato" <NicholasScarpinato@discussions.microsoft.com> wrote 
> in message
> news:A72D7427-287A-4DBB-9BCB-37CFD08153CB@microsoft.com...
> >I have a report I'd like to generate that will tell me the time between 
> >each
> > transaction in the database for a user, and the average time between
> > transactions. I'm having trouble figuring out how to do this. The field in
> > the table is called EntryStartTime. What I'd like to do is sort the start
> > times in ascending order, determine the time difference between the first 
> > two
> > records, and then continue to the second and third, third and fourth, etc. 
> > I
> > have a feeling the answer is probably really simple, but my brain isn't
> > working yet this morning. I'd like to try to avoid doing this with code if 
> > I
> > can. 
> 
> 
0
Utf
3/12/2008 7:40:37 PM
Reply:

Similar Artilces:

Time Sheets #2
I have looked at various Time calculation examples but have not seen this really addressed Is there a way to have a time sheet where people do not need to enter time using military time or using AM or PM in the actual entry. We have a business that is a normal 9 - 5 business so there is no overnight or really late night work hours. If start time is in C2 , lunch out in D2, lunch in in E2, time out in F2. Normal time calculation is (F2-E2+D2-C2)*24 Am trying to use (IF(F2>E2,F2-E2,(E2+12)-E2)+If(D2>C2,D2-C2,(D2+12)-C2))*24 but am not getting correct answer (Trying to add 12 hours ...

difference between window dimensions and window client area dimensions
I need to find the difference between window dimensions and window client area dimensions for an SDI application. Currently I'm using the brute force method: CRect clientRect; GetClientRect(&clientRect); CRect mainRect; GetWindowRect(&mainRect); int frameExtraX = mainRect.Width() - clientRect.Width(); int frameExtraY = mainRect.Height() - clientRect.Height(); This is ugly and doesn't always work, so I would like to get frameExtraX and frameExtraY from some kind of system metrics values. Thank you! You've already said the magic words "system metrics&q...

determine mail flow problem!!!!!!!!
Help! :-( Our mailflow from 2 backend 2003 exchange servers keeps queuing up in the outbound queue (which is set to always run delivery). Messages stay in there from 10 to 120 minutes before being sent to our gateway MTA and then sent off site (to hotmail.com for example). However when I telnet from a backend server to the gateway over port 25 and send a test message it goes right away. I can't for the life of me figure out why. One example when viewed in message tracking history says: 10:16am - smtp: store driver, message submitted from store 10:16am - smtp: message submitted to ...

Pictures disappear over time
A website will download an excel file that is embedded in an IE window. I save that file as type .xls. For about a week, the pictures in the Excel file will display. After that, the pictures no longer display. How do I get the pictures that support the Excel document to save in a location where they aren't deleted over time? I've tried changing the web properties option to not put files in a sub folder, but when I save in Excel, the picture files aren't where I can find them. Also, if I save the file as .htm instead of .xls, I get a folder with images in it in the same fo...

Business Portal Project Time #2
Import the overtime rules by State when updating Tax info and have Project Time warn users when entering overtime incorrectly. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgbrowser/en-us/default.mspx?m...

Time of by 1 hour
Hello, the time I receieve my emails are off by 1 hour . How can I fix this? Thanks in advance. Chris Check your time zone and daylight saving time settings in both Windows *and* Outlook on your machine. If all of those are correct, it's a server problem. -- Jocelyn Fiorello MVP - Outlook *** Messages sent to my e-mail address will NOT be answered -- please reply only to the newsgroup to preserve the message thread. *** In news:2cf9e01c469e6$66dcd6c0$a401280a@phx.gbl, chris wrote: > Hello, the time I receieve my emails are off by 1 hour . > How can I fix this? > > Th...

To compare info from two worksheets
I need to compare once column of data in first worksheet to two columns in second worksheet. What is the best way of doing this?? thank -- Message posted from http://www.ExcelForum.com What kind of comparisons are you making? What are you looking for - duplicates? differences? less than/greater than? in either one of the two columns? only in both columns? What are you comparing - text? dates? numbers? More info = more help. 8>) Ed "lisaoc >" <<lisaoc.16tlyr@excelforum-nospam.com> wrote in message news:lisaoc.16tlyr@excelforum-nospam.com... > I need to com...

set or reset the print range for several sheets at a time?
how do you set or reset the print range for several sheets at a time? Manually I don't think it's possible to set more than one sheet's print area at a time. Of course a macro can make this a lot quicker. -- Jim Rech Excel MVP "Mestrella31" <mestrella@mxn.com> wrote in message news:BF8D4BDF-1787-4633-B5D0-AA6F2E4732AF@microsoft.com... | how do you set or reset the print range for several sheets at a time? Unfortunately setting the print area on grouped sheets is not an option without using VBA. Code from Bob Flanagan for setting same print area on groupe...

MsQuery returning one record + one empty record
Hi all, In the same excel file, i have one sheet containing data and one running a MSQuery to retrive some of the data with a parameter. The problem is that when only one record should be returned, I have that record and a blank record. Because I have formulas that are auto-extended, I have two lines of formula. In MsQuery UI, there's only one record. I hope this is clear, Thanks Pierre-André ...

Determine columns used
I have 100+ spreadsheets which i have to edit into a certain format. The spreadsheets currently have 100 columns (from 1-100). From there i have to reduce the number of columns set to 8 columns. E.g: 1 2 3 4 5 6 7 8 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 (from column 9 onwards, it goes to the 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 next rows' column 1) 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 How do i do that without altering the order of the value of the cell? Let me make sure we understand the question. You have ...

run-time speed
Hi. I have a SDI application, and a Dialog application that call the same DLL (passing the same information, and getting the same result). However, the SDI application's DLL call takes around half the time of the Dialog application's DLL call. How could this be so? Sounds like you need to do a little profiling to answer this question. You can use a commercial package, like VTune, or just roll your own. Brian "hamishd" <Hamish.Dean@gmail.com> wrote in message news:441977e4-0544-47d9-ac76-7723c41d43f0@s19g2000prg.googlegroups.com... > Hi. I have a SDI application,...

How to move task on completion to a different folder?
Guys, I'm a real newbie to outlook. What I want to do is have a task list that when I click to say that a task is complete, I would like it moved to another folder that I have setup called tasks done. I cannot find a way to do this and there is no way I can see to record a macro. I just get a visual basic editor, and I know absolutely nothing about coding. Is this something someone could guide me through or am I resigned to dragging the completed task to the done task folder for eternity. Thanks, Rav. ...

Hyperlinks from one document to another document on a different dr
When I have made a Hyperlink from a document in one drive to a document in another drive it works until I save it go out of the file. When I log back into the file that had the link set in it it does not work, gives an error message when the link is selected: The address of this site is valid, check the address and try again. I have re-done this quite a few times with the same results. Help ...

adding times
please help, i need to add times greater than 9999:59 on my laptop running xp on a spreadsheet ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ Times in XL are stored as Fractional days (i.e., 03:00 = 0.125). So you can continue to add times >9999:59, but you can't display them in time format. You can get a decimal format by multiplying by 24, e.g.: A1: 9999:30 A2: 1:45 A3: =(A1 + A2) * 24 ===> 10001.25 Or you could display the colon forma...

Font change on a different computer
I create a Word document using Verdana font. When I send it to another person they tell me the font is converting to Verdan Lantin. Any ideas why this would happen? -- Thanks...John Sorry...this is a duplicate question. Please disregard. -- Thanks...John "John" wrote: > I create a Word document using Verdana font. When I send it to another > person they tell me the font is converting to Verdan Lantin. Any ideas why > this would happen? > -- > Thanks...John ...

Dynamically determining when a month ends
Hello all, Ok, I have a simple excel spreadsheet, where I keep track of my spending on one tab, my income in another and my summary in a thrid. My problem happens when I try to dynamically calc. avg's for months in the summary page. For instance, if I want to see how much money I spent on average per month, or even per day, I draw from the data entered into the spending page. Now, the spending page is set up with the following columns: Date:: Description:: Amount The problem with this is that I can't predefine a max row # for each month, since I might have 80 entries in spending...

how to determine the size of the sheet
Hi I had a collegue who told me once a way to dtermine the number of the rows in a sheet of the workbook I am working at. It is known that when you open a new workbook each sheet has maybe 65365 or something like that rows. MY QUESTION IS: HOW TO MAKE THE SHEET 1000 ROWS OR WHATEVER NUMBERS OF ROWS I ONLY NEED? Thanks in Advance, Ahmed Hi Ahmed The number of rows and columns are fixed. Your workaround would be to hide the ones you consider unneeded. HTH. Best wishes Harald "Ahmed SHEBL" <ahmad.shebl@hotmail.com> skrev i melding news:%231uFO3IcHHA.4720@TK2MSFTNGP0...

Transposing Sun and Moon rise and set times...
Hello, I have data that represents, rise and set times for the sun and moon over a time span of 12 months. Data for each consecutive month appear in joining columns as follows: January February Day Sun_Rise Sun_Set Moon_Rise Moon_Set Sun_Rise Sun_Set Moon_Rise Moon_Set 1 0700 1625 1400 0255 0705 1710 0901 2114 2 0701 1625 1429 0413 0704 1711 0924 2229 3 0702 1625 1504 0532 0703 1713 0947 2343 4 0703 1625 1548 0650 0702 1714 1013 5 0704 1625 1642 0803 0701 1715 1042 0056 6 0705 1625 1745 0905 0700 1716 1117 0207 7 0706 1625 1854 0955 0659 1718 1159 0315 8 0707 1624 2003 1034 0657 171...

Non working time
I am new to Project 2007, havn't used Project in about 4 years. I can create a new calendar, based upon the Standard calendar, but can not modify it to accomadate 10 holidays and change the work hours from 8-4 to 7:30- 4:30 for the project I am going to manage. I then want to assign it to the MS Project file I create. Q1: How can I accomplish this, I can not determine how to modify and assign this new calendar? Q2: Will I have the same issues with Resource calendars, which in some cases will vary from project's base calendar? Thank you all very much Marsh Hi, &qu...

Combobox values as query releted to current record
Is it possible to populate a combobox (just to show related data, not for selection) on a subform. And in such a way that in datasheet view the combobox when clicked show the data for the relevant record of the subform. The subform is related to the mainform of course. Just a mindgame, suppose I have a mainform which displays persons who own farms. On the subform all the farms are listed in datasheetview with some related info. Now I would like to add a combobox which when pressed displays the animal groups (dogs, cats, pigs, cows etc.) which are living on that particular farm, so when you go...

Great Plains Part time consulting/training job opening -Silicon Va
Hello All, My company, located in the California Silicon Valley, is looking for Great Plains knowledgable people on a part time basis. There are a couple of openings. If you are a Great Plains consultant (any/all modules), email me your resume at haribhagat@hotmail.com If you are a Great Plains user with knowledge on Great Plains Manufacturing or Great Plains Project Accounting module and would like to do additional part time work, send me your resume too. The company is located in the California Silicon Valley, local people only. --HB ...

Report Showing Different U of M
Is there a report where I can see my item numbers not in the base unit of measure? For example, see items by 'case' as opposed to 'each'. Thanks in advance! Craig YES! It's a 3rd party solution and I'm being worthless tonight beause I can't recall the name. Hopefully someone will be able to help me out. It does exist, I've seen it and used it. Let me know if nobody comes through with the vendor and I'll hunt it down fo you. leslievail@earthlink.net LV "Craig" wrote: > Is there a report where I can see my item numbers not in the ba...

You will pass all the exams at 1st attempt No more headaches and worry about spending the time and money to attempt another exam again. You will pass all of your exams, every time www.FreeExamKing.com
You will pass all the exams at 1st attempt No more headaches and worry about spending the time and money to attempt another exam again. You will pass all of your exams, every time www.FreeExamKing.com ...

Add Record from form into two tables
I have a form (frm_Invoice) that records phone serial # from customers. I want to create a new record in both the tbl_Inventory and tbl_Inventory_Detail when someone scans in a DEC_SN into the frm_Invoice. The issue I am running across is that the tbl_Inventory_Details has a child relationship to the tbl_Inventory. I chose this set up because most of the inventory is manually entered from shipments received from a warehouse. I created a form and sub form for the inventory tying the SN_ID from each table on a one to many relationship. I do not know how to update both tables at ...

24 hour time format conversion
Hello, I have a database that I have been trying to convert into a correct and recognizable time format. The old db kept time in numeric form 01...2400. The problem is when I try to import this into the new database using CDate() it gives and error for each 2400 hour. I understand that Access (2003) expresses 2400 hours as 0:00 but cannot seem to get the right conversion for the append query. Here is what I have for the query expression: TimeValue: Date(IIf([Stored_Sampler_Data]![Time]<60, (Format([Stored_Sampler_Data]![Time],"00:@@")), (Format([Stored_Sampler_Data]![Time],"...