#### Calculating Time Difference

```Hi,

I am trying to develop a query where my client wants to track how much
time in minutes does a nurse spend in various activities (staff
education, patient/family education, answering drug relation questions
etc. etc.) to assist nurses in other units. What query type should I
use? How do I write the query? There is a start time (when the nurse
recieves the call) and completion time (when the nurse hangs up).

Thanks
Mrinalini

```
 0
drmrinalini
4/15/2007 1:57:12 PM
access.queries 6343 articles. 1 followers.

2 Replies
805 Views

Similar Articles

[PageSpeed] 13

```<drmrinalini@gmail.com> wrote in message
> Hi,
>
> I am trying to develop a query where my client wants to track how much
> time in minutes does a nurse spend in various activities (staff
> education, patient/family education, answering drug relation questions
> etc. etc.) to assist nurses in other units. What query type should I
> use? How do I write the query? There is a start time (when the nurse
> recieves the call) and completion time (when the nurse hangs up).
>
> Thanks
> Mrinalini
>

Have a look at the DateDiff() function in VBA Help.

Ed Metcalfe.

```
 0
Ed
4/15/2007 2:04:54 PM
```drmrinalini@gmail.com wrote:
> Hi,
>
> I am trying to develop a query where my client wants to track how much
> time in minutes does a nurse spend in various activities (staff
> education, patient/family education, answering drug relation questions
> etc. etc.) to assist nurses in other units. What query type should I
> use? How do I write the query? There is a start time (when the nurse
> recieves the call) and completion time (when the nurse hangs up).
>
> Thanks
> Mrinalini

DateDiff("n", StartTimeField, CompletionTimeField)

....will return the minutes between the two DateTimes.

If you use that in a Totals query grouped by NurseID and activity, and use Sum
on the above expression then you will get the total minutes per activity per
nurse.

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com

```
 0
Rick
4/15/2007 2:07:08 PM

Similar Artilces:

How to keep IE from timing out on long operation
It seems that IE8 is less forgiving for long operations than previous versions. 10 seconds and it abandons the connection. Is there a way I can have my aspx file inform IE about how long to wait, or to give it some indication that data is coming during a long operation (like a long SQL query). Thanks, ....Matt "Matt Houser" <matt@houser.ca> wrote in message news:BC2449A0-AD91-4AB4-B775-EED321D95EC5@microsoft.com... > It seems that IE8 is less forgiving for long operations than previous > versions. 10 seconds and it abandons the connection. Th...

Attempting to perform two different sorts on one worksheet.
Great Gurus of VBA, I have a worksheet, which uses the following VBA procedure to sort th data when the last bit of entry occurs in column H. However, when want to print this spreadsheet I need the data to be sorted differentl and I am apprehensive about putting the code for the second sort int the sheet object because I am unsure about how the two might conflic with each other. Can someone give me an idea about how to have thes two different sorting routines work on the same sheet and not mess eac other up. I thought of putting a command button on the sheet to initiat the second sort but.....

Report writer function/calculated field question
I have a string field that consists of a number followed by a decimal followed by 5 zeroes. The number is always a whole number so I want to remove the decimal and the 5 zeroes. However, since the field is a string, I'm struggling to find a way to do that. Does anybody have any suggestions? Thanks. Zack I would use the RW_Strip user defined function. This function will return the value of the string with all occurrences of the specified characters stripped out. So you want to strip out .00000 and retrieve the remaining value? You would pass in the string field and then the characters y...

Calculating times #2
I have two columns. One which calculates the length of time a job will take to run on a machine, and the other in which we put the time the job will come off the machine. At present we enter the time off manually. Is it possible to calculate the time off automatically (to the nearest 1/4 of an hour) if we put in a start time ? Thanks Assuming that the start time is in A2, job time in B2, and they are both formatted as time, just use =ROUND((A2+B2)*96,0)/96 -- HTH RP (remove nothere from the email address if mailing direct) "gibbylinks" <gibbylinks@discussions.microsof...

Formulas not calculating properly
I need help! I created a worksheet before with formulas and I protected the sheet. I made it so that rows can be added and numbers can be inputted and the formulas will still sum the numbers. It worked fine until today. Now, on the status bar, it shows Calculate and it doesn't add any new numbers inputted. I have to unprotect the sheet and F2 the formula and enter to update the sum. Why is this happening? Thanks for any help. Sounds like you are manual calculation mode. could be the result of several things. Try going to Tools--> Options-->Calculation and see if it is...

Two different queries return same results
I’m calculating average returns for stocks over two time periods; 30-days and 90-days. These two queries always return the same results for different time periods and I have no idea why. PARAMETERS [Forms]![frmMstr]![cboEnd] DateTime; SELECT Avg(SharePrices.StockPrice) AS AvgStockPrice30_Days, SharePrices.StockSymbol FROM tblStocksGroup INNER JOIN SharePrices ON tblStocksGroup.Ticker = SharePrices.StockSymbol WHERE (((SharePrices.DateTime)>=DateAdd("d",-21*(365/250),[Forms]![frmMstr]![cboEnd]))) GROUP BY SharePrices.StockSymbol; PARAMETERS [Forms]![frmMstr]![c...

What is the difference between XmlNode and XmlElement?
What is the difference between XmlNode and XmlElement? I'm trying to implement the code at http://www.devx.com/dotnet/Article/11616/0/page/3 in C# and I'm getting an error at this line: this.appSettingsElement = this.xml.SelectSingleNode("//configuration/appSettings"); Error: Cannot implicitly convert type 'System.Xml.XmlNode' to 'System.Xml.XmlElement' Thanks. Pluto wrote: > What is the difference between XmlNode and XmlElement? The same as between fruit and apple. XmlElement is particular type of XmlNode. > this.appSettingsElement = > this....

vba timing
Hi, On a daily basis I recieve emails which have spreadsheet attachments, these emails I want to move to another Outlook folder and save the attachment to a folder on my 'c:' disk drive. I have vba code to save the attachment and I created a rule for when the 'subject' line contains specific text to move it to the other Outlook folder and run a vba sub which calls another sub which does the actual work, see below(ps: I got this code from someplace on the web). I believe this code/process will work but I'm having one issue which is the rule says Apply this ...

calculation of cells
Periodically I open a work book and the calculation option has been changed to manual and I cannot figure out why. It seems that it would have to be done by a user and most of my spreadsheets are only used by me. Any ideas out there Mark, Calculation, auto or manual, is set by the first workbook that's opened. It is that way for any other workbooks opened in that instance of excel. Look for a workbook you might have opened first that's been set to Manual and saved that way. Go figure. -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------...

How to specify time with DATEDIFF
Is it possible to specify a specific hour when using DATEDIFF? For example this snippet from my query: (DATEDIFF(day, acct_banktran.eff_date, { fn NOW() }) <= 1) I know that this will query all acct_banktran.eff_date that took place yesterday but it pulls all of them starting from 12:00a.m.. How can I limit that query to only get specific acct_banktran.eff_date at a certain hour? Thank you. gjl_support wrote: > Is it possible to specify a specific hour when using DATEDIFF? For example > this snippet from my query: > > (DATEDIFF(day, acct_banktran.eff_da...

Cell formats, and time difference
Hi, some simple questions which I hope someone can help with... I am using excel on a computer with "danish locale". This means that numbers are displayed default like 1234,56. How do I change this to a format using a decimal point (instead of a comma)? How do I find the difference between to times? I have cells which just have times (not dates), and I want to find the difference between two times in hours. For example cells with 08:00 and 09:30 should give a difference of 1.5 Excel help gives an example like =TEXT(B2-A2,"h"), but this gives an error... Thanks, Pet...

How can you see in real time who is sending email
- Hello everyone, Exchange 5.5 How can I see in real time who is sending outbound email? Several times per week I have users sending out large amounts of email. I need to know if there is a way to see who is sending in real time. Something that will point me to the user(s) doing the sending right now (real time) Thanks for any help, Terry On Tue, 15 Nov 2005 11:41:45 -0500, "theitman" <nospam@olsbuff.com> wrote: >- >Hello everyone, > >Exchange 5.5 >How can I see in real time who is sending outbound email? >Several times per week I have users sending out...

how do i count mails with time and date
i have a helpdesk , i would like to know the tracking all mail , as like time and date on responded "Bhanu C" <Bhanu C@discussions.microsoft.com> wrote in message news:4F0F08B1-3302-43F9-B2F8-5FE1BEC99A9B@microsoft.com... >i have a helpdesk , i would like to know the tracking all mail , as like >time > and date on responded Why not just look at the InfoBar? -- Brian Tillman [MVP-Outlook] see http://www.slipstick.com/exs/customfields.htm - specifically the replied time section. If needed, you can copy rows to excel and compare dates etc. -- Diane Poremsky...

How Project Calculates Slipped, Slipping, and In Progress
Can someone please explain how Microsoft Project classifies tasks into the following categories for filtering purposes: Slipped Tasks, Slipping Tasks, In Progress Tasks. I am using Microsoft Project 2007. Thanks! Connie Connie, Easiest thing to do is look at how Project defines them in the filter. Menu: Project/Filtered For/More Filters/ .... select the filter of interest, then press the Edit button. You can there how they are defined. --rms www.rmschneider.com Connie wrote: > Can someone please explain how Microsoft Project classifies tasks into >...

Combined date time cell to separate date & time components #3
From file dump have combined date time cells eg 14/04/03 14:20 (value 37725.59722). Want to perform time analysis so need to split to 2 separate cells; eg. "14/04/2003" (value 37725) & "14:20" (value 0.59722). Is there a fnc to do this? (Currently convert cell to value, then fncs trunc & cell less int(cell) then refmt to date dd/mm/yy & time hh:mm respectively) Please look for the previous answers you've gotten, including at least 2 to your identical post yesterday. In article <F0A5B5BA-2E80-4875-A042-D3514FD4E228@microsoft.com>, "Ma...

HELP!! Formula with different conditions
Hi there. I'm hoping someone can help me. I'm pulling my hair out trying to figure out how I can take a certain number of hours (for OT banking purposes) and calculating anything over 7.5 hours, up to 11 hours in one column - and anything over 11 hours in a separate column. For example: An employee worked 15 hours in a day. In the first column the formula would provide the number 3.5 (as 7.5 plus 3.5 is 11 hours for the day) and the second column would provide the number 4 (as this is the number of hours over the 11 hours). Any help that anyone could provide would...

Formula causing run-time error in Excel Programming
This is a repost. I have the following line of code that I am trying to drop in a cell via Access VBA but I keep getting a Run-time error 1004, Application-defined or object-defined error. xls.cells(Rw, Col + lngColumn).value = "=SUMPRODUCT(SUBTOTAL(9,OFFSET(ET_Raw_Data!\$C\$2:ET_Raw_Data!\$C\$20000,ROW(ET_Raw_Data!\$C\$2:ET_Raw_Data!\$C\$20000)-ROW(ET_Raw_Data!\$C\$2),0,1)),--(ET_Raw_Data!\$A\$2:ET_Raw_Data!\$A\$20000=A" & lngColumn + 1 & "),--(ET_Raw_Data!\$D\$2:ET_Raw_Data!\$D\$20000='Feature Request'))" I already have 2 other formulas that are being add...

Lump sum calculation
Does any one know what function (PMT - PPMT- PV- FV) I have to use the get my results? I want to have 18 years from now the amount of \$70,000 If the interest rate will always be 12% I want to make only one payment new. Can any one help me find the function? I couldn't do it by my self, I need your help. Thanks Joe Hi Joe! Try: =PV(12%,18,0,70000,0) Returns: -9102.77130820508 The negative reflects a payment out of 9102 in return for a payment in of 70000 You could negate the function or negate the 70000 if you want a positive sign but in general terms life is less confusing if you fol...

Run Time Error 9 (Subscript out of Range) for XLA file
I just turned an xls file into an xla file and am having some issues with my code. The code snippet below is failing on: Windows(varfile1).Activate. varfile1 is the name of the xla file. When it was an xls file I selected the workbook, then selected a sheet in it, then selected a start cell and then figured out what the used range was (I know I can also employ .UsedRange but will ignore for now). However, now that its an xla file I cannot seem to a get to my start cell (within a sheet in the xla file) by selecting the xla file and its sheet. How do I get around this. Thanks in adv...

set first record to zero in a calculated field
I have a query which compares the current record's create time with the previous record's create time, which gives me the number of seconds elapsed between button presses. All works fine, except the first record is blank. I want it to say either zero or 1 second, regardless of what the query say's. This is the SQL (which creates a sub query from the exisitng table in order to compare current with previous record.) SELECT tbl_Waypoints_Reveal_Target.Run_No, tbl_Waypoints_Reveal_Target.Run_waypoint_List_ID, tbl_Waypoints_Reveal_Target.Run_waypoint, tbl_Waypoints_Reveal_Targe...

Invoice calculations
I reported to MS Tier I tech service that there was a bug in MS Money Sm Business 2004 in the invoicing area. Specifically, while MsMo allows a number such as \$.375 to be entered for a rate or product price, it immediately rounds up that number to whole cents then performs the calculation with the quanity to get the invoice amount. For example to calculate reimbursible mileage at \$.375/mile x 100 miles, the amount should be \$37.50, yet in MSMo, it will be \$38.00. I was shocked when MSFT Tech Support stated that this was not a bug but was by design. QUOTE: Actually, I can reproduce...

different domains
Hi there, How can I modify the OU in order to assign an especific domain to the users that belong to that OU? Suppose that I have two OUs, one called First and the 2nd one called second; and I have 10 peoples in each OU, but I have two domains, one colled domain1.com and the other one called domain2.com I want to create the 20 users, but once inside the OU the software should be able to assign the domain that belongs to tha OU. Is it possible? Tks a lot. tDL In the last exciting episode, "Administrator" <administrator@domoti-k.com> wrote: >Hi there, > >How can I ...

Format time to not include seconds and AM/PM
I am bringing data with appointment Times over from another program. I am using a TIME formula to subtract 15 minutes off to let person know when to show for appointment. Problem that is occurring is how the time shows. The time in the cell itself shows as 1:30 but when you click on the cell & view it in the formula bar, it shows as 1:30:00 AM. I'm Mail Merging (WORD) this data for letters and do NOT want the full time with seconds and AM/PM to show on the letter. How do I format this in EXCEL so only the 1:30 shows? In the cells (whole column or whole row will work the...

How to setup Automatic Send/Receive time interval ?
I once knew where to click to set the time interval for auto send/ receive. Where do I click in Outlook 2003 to be able to set the automatic send/ receive time interval? Thanks for any help. Mel <MyEmailList@gmail.com> wrote: > I once knew where to click to set the time interval for auto send/ > receive. > > Where do I click in Outlook 2003 to be able to set the automatic send/ > receive time interval? While viewing a mail folder, press ALT-CTRL-S -- Brian Tillman On Jul 9, 2:57 pm, "Brian Tillman" <tillman1...@yahoo.com> wrote: > Mel <MyEmai...

Ultra-rapid mouse scroll function appears at (seeming) random time
I'm using Office 2007 and an HP mouse under Windows 7. From time to time, apparently at random (although perhaps there is some keyboard of scroll wheel trigger I have not identified), the mouse cursor changes from the normal pointer to a black-filled triangle above or below a central dot, and mouse scrolling becomes ultra-ultra-fast, and bypasses the scroll wheel. The slightest movement of the mouse up or down quickly makes the Word document, Excell workbook, or whatever, jump to the top or bottom of the open file. This "black-filled triangle above/below a central dot&q...