Query The Number Of Business Days

Dec 8, 2007

Hello all,

I have 2 tables:
- Employee
- PackageTracker (Contains PackageNumber, date received, date sent, status)

I would like to query:
- which employee has the package
- How long have we had the package (calculate only business days)
- What is the status

I would like the things mentioned above to be ran in one query.

I am stuck with the calculations. I found a macro code to calculate the business days but I am stuck.

Please advise.

Thank you,


John

View Replies


ADVERTISEMENT

Help With Business Days

Mar 19, 2008

Good Afternoon All,

I am in need of you help in calculating this. Basically, I don't want the code to count zero. For example, today is 3/19/2008 - Date() should equal = 1 and not zero..

Here's some more examples:[lastfollowup] being 3/18/08
Date() - [LastFollowup] = 2

Here's my code:
DaysOpen: ((DateDiff("d",[LastFollowup],Date(),2))-(Int(DateDiff("d",[LastFollowup],Date(),2)/7))*2)+IIf(Weekday(Date(),2)>5,5-Weekday(Date(),2),0)+IIf(Weekday([LastFollowup],2)=6,1,0)-IIf(Weekday([LastFollowup],2)>Weekday(Date(),2),2,0)

Thank you,

John

View 1 Replies View Related

Business Days

Feb 22, 2006

I am trying to calualate the business from an Order Date. The Business Days are Monday thru Friday excluding Holidays. It is for a form that will Highlight (conditional Format) Order over five business days old that have not been completed. Has anyone done this before?

View 2 Replies View Related

Calculating Business Days

Mar 22, 2006

Hi,

Is there any access formula that can calculate the net business days between two dates.

Regards,

Jatz

View 2 Replies View Related

Business Days Caculation

Jan 22, 2007

SELECT
[(2) MAX BATCH].ID_CASE,
[(2) MAX BATCH].MaxOfDT_BATCH,
NOLDBA_LOG_DISBURSEMENT_DETAIL.DT_DISBURSE

FROM
[(2) MAX BATCH] INNER JOIN NOLDBA_LOG_DISBURSEMENT_DETAIL ON
([(2) MAX BATCH].MaxOfDT_BATCH = NOLDBA_LOG_DISBURSEMENT_DETAIL.DT_BATCH) AND
([(2) MAX BATCH].ID_CASE = NOLDBA_LOG_DISBURSEMENT_DETAIL.ID_CASE);


Can someone tell me how to find the ID_CASE's where
NOLDBA_LOG_DISBURSEMENT_DETAIL.DT_DISBURSE is less
than or equal to 2 business days (M-F) of the MaxofDT_BATCH in this query?

View 1 Replies View Related

Nz Function In Business Days HELP!

Aug 21, 2007

I have a query that calculates business days. However if my end date is missing the query has error codes because the date its looking for is null. Can show me were to put the nz function.

here's the module for the business days

Function Work_Days(BegDate As Variant, EndDate As Variant) As Integer

' "Calculating the workdays between Dates"
' Note that this function does account for holidays.

Dim WholeWeeks As Variant
Dim DateCnt As Variant
Dim EndDays As Integer

BegDate = DateValue(BegDate)
EndDate = DateValue(EndDate)
DateCnt = BegDate
EndDays = 0

Do While DateCnt <= EndDate

If Not IsNull(DLookup("HoliDate", "tblHolidays", "[HoliDate]=#" & DateCnt & "#")) Then
EndDays = EndDays - 1
End If

If Format(DateCnt, "ddd") <> "Sun" And _
Format(DateCnt, "ddd") <> "Sat" Then
EndDays = EndDays + 1
End If
DateCnt = DateAdd("d", 1, DateCnt)
Loop
Work_Days = EndDays


End Function

and here's the query

SELECT [Reques_ID], Work_days([Date_Received],[To_Director]-1) AS Turnaround_To_Director,
Work_days([To_Director],[From_Director]-1) AS Turnaround_From_Director, Work_days([To_VP],[From_VP]-1) AS Turnaround_From_VP, Work_days([Position_Number_Requested],[Position_Number_Recieved]-1) AS Turnaround_For_Position_Number, Work_days([Date_Received],[Approval_to_mgr]-1) AS Turnaround_EPS, Work_days([Date_Received],[JOIS_Posted_Date]-1) AS Turnaround_To_Posting, Work_days([Approval_to_mgr],[JOIS_Package_Return_Date]-1) AS Turnaround_For_Package_Return
INTO tbl_turnaround
FROM Artifact;

View 7 Replies View Related

Calculate Only Business Days

Feb 10, 2005

I have a date range of 1/01/2005 to 12/25/2005 for example. I need a formula to return the number of days between these dates excluding weekends. Basically I need to know how many business days are between these dates. Thanks for the help.

View 1 Replies View Related

Count 10 Business Days From Xx

Jul 22, 2006

I have seen a few modules that let you count how many business days between two dates. What I am looking for is how to count 10 business days from another field.

Say for example I have a txt box that auto populates =Date(). I want to have another txt box that will count 10 business days ahead and put that date in the box.

This is so I can have the db show a due date for reports sent in.

Anyone seen/done/have code for this?

View 2 Replies View Related

Adding Business Days To A Date

Sep 17, 2004

Is there a function in Access that will allow you to add business days to a date? I want to pull a date with a query and then add 5 business days to it to display in a report. Anyone know if this is possible?

Thanks.

View 1 Replies View Related

DateDiff Count Only Business Days?

Oct 15, 2004

Hi, I'm trying to get some date tracking stats...
trying to get the average number of days between two dates using formula:
=Avg(DateDiff("d",[DateRec],[DateNumb]))
where datenumb was the first date app was entered into db and
where daterec is the date the first part of app was recorded.
this works but I'm assuming it's counting straight calendar days. I was wondering is there a way to get it to count only business days and not weekends or holidays in access???

View 6 Replies View Related

Reports :: Count Number Of Days Each Week (7 Days) Person Has Worked

Jan 24, 2014

I have to count the number of days each week (7 days) that a person has worked - simple enough.

But - what if they come off the job within the week?

I have been using the DateDiff function which is fine.

In the database they have a Mobdate and a DeMobDate but if the DeMobDate falls within the week the whole thing falls apart?

View 2 Replies View Related

Queries :: Number Of Days Between Two Dates With Irregular Days Worked

Apr 14, 2014

I have a form where a start date is inputted (Inputfrm , StartDate) and a form where the end date of the process is recorded (Inspectionfrm , EndDate) and these both record in the table InputTbl as StartDate and EndDate respectively.

I have created a union query which shows a list of all the dates where there is work recorded (WorkingDatesQry and the column of list of unique dates is "WorkingDate"), and as we run a highly varied schedule depending on time of the year and order numbers I cannot just use a query which says Monday-Friday or Tuesday - Saturday.What I am trying to do is to find the number of days between StartDate and EndDate where there is a date recorded in the WorkingDates query.

View 1 Replies View Related

Number Of Days Query Help

Mar 6, 2008

I imported an large Excel file with a date column consisting of 3 different date formats and need help on a query to extract the number of days. Examples of the date on that column:

7/6/2006
7/1/06-7/31/06
7/1-7/5

Appreciate any advise.

View 7 Replies View Related

Number Of Days Between Dates In Query

Apr 22, 2005

I want the number of days between a specific date (roll out date) and 12/31/2005 so that
I can use the number to project revenue for this year.

This is what I'm using but it doesn't give me the right number. I don't know how to transform
something to a datetime variable so maybe that's the reason. Can you help me out?

Expr4: Day(12/31/2005-[Scheduled Roll Out Date]-0.49999)

View 1 Replies View Related

Queries :: Number Of Calls During Business Hours

Oct 28, 2014

I have to create a query that will reflect the number of calls and messages a person has either taken during business hours and if a message was left how long did it take them to return the message. We are open from 6:00AM - 4:30PM so my boss wants to only see how many calls a person took during business hours. now the users have to run this report daily and monthly. and have to make it accessible through a report so they can send it to the supervisors.

The two fields I have to make the calculations on is the [Date & Time Left] the time the call was made [Date Returned] if they left a message the date it was returned. Also if the call was returned in one day she wants it broken down into minutes (as in how many hours and mins was the call returned)

This is what I have so far: I noticed there was something in Excel called NETWORKDAYS?

Code:
SELECT [Message Tracking].[Date & Time Left], [Message Tracking].[Date Returned], DateDiff("h",[Date & Time Left],[Date Returned]) AS TotalHours, [Message Tracking].ID, [Message Tracking].[User Returning]
FROM [Message Tracking]
GROUP BY [Message Tracking].[Date & Time Left], [Message Tracking].[Date Returned], [Message Tracking].ID, [Message Tracking].[User Returning]

View 1 Replies View Related

Queries :: Calculate Total Number Of Days Between Two Dates In A Query

Feb 18, 2015

Basically I have a report that shows any 'Issues' that wasnt closed within the KPI Target.

I have the report working, but I simply want to do a count of how many days the observations overran the 'Target Date of Closure'.

The report also shows observations that are not closed but passed their Target Date of Closure. These observations will not have a 'Actual Closure Date', but I would like to still have a count of how many days its overrun closure.

This is a formula I tried to piece together but obviously not correct as it's not returning anything;

IIf(IsNull([Issues]![Actual Closure Date]),DateDiff("d",[Issues]![Target Date of Closure],
Date()),DateDiff("d",[Issues]![Target Date of Closure],[Issues]![Actual Closure Date]))

View 2 Replies View Related

Number Of Days

Apr 5, 2008

I have a query which returns 2 dates. I need to add an expression which will calculate the number of weekdays (Monday to Friday) between the 2 dates.

Anyone help me?

View 1 Replies View Related

Number Of Days Between Dates

Sep 9, 2006

Hi,

I need to work out a couple of calculations, the number of days between an engineer starting and finishing a project, the number of days between the project being put on the database in the first place and being completed by an engineer and finally, the difference between these. These maybe simple, but I have no idea tbh (still new to access).

I have a form with the date it was added onto the database, and the engineer fills in the date started and date finished as it happens.

These run off of 2 tables BookingIntbl and TechnicalServicestbl

[BookingIntbl].[Date], [TechnicalServicestbl].[Date Started] and [TechnicalServicestbl].[Date Finished]

I have then got the fields, 'Days with Engineer', 'Days in Repair Centre' and 'Day Difference' for the answers to be displayed.

Any help would be appreciated, Ben

View 2 Replies View Related

Calculate Number Of Days

May 4, 2006

In a database, I have the following date fields that I use to track projects that start and stop.

START1
STOP1
START2
STOP2
START3
STOP3

Is there a way I can use a query to calculate the total days the project was worked on? For example if I enter 1/1/06 in START1, 1/10/06 in STOP1, 2/1/06 in START2 and 2/15/06 in STOP2, 3/1/06 in START3 and 3/30/06 in STOP3, I need to calculate the total days. I need it to work regardless if there are 3 start/stops, 2 or just one start/stop.

I really appreciate the help.

Jim

View 14 Replies View Related

Number Of Days In One Interval And Not In Another

Feb 8, 2007

How would I find if 2 dates fall between 2 other dates?

For example:

This would evaluate to True
StartDate 02/08/2007
EndDate 02/11/2007

StartTestDate 02/09/2007
EndTestDate 02/10/2007

This would also evaluate to true
StartDate 02/08/2007
EndDate 02/11/2007

StartTestDate 02/07/2007
EndTestDate 02/12/2007

This would evaluate to false
StartDate 02/08/2007
EndDate 02/09/2007

StartTestDate 02/10/2007
EndTestDate 02/11/2007

View 5 Replies View Related

Number Of Days Between Last Pay And Today

Jun 27, 2007

I'm looking to pickup the cases where the date last paid is greater than 60 days. Can someone help me

select id_case,
dt_last_pay
from noldba.case_rollup;

View 4 Replies View Related

Calculating Number Of Days Using Dates

Mar 15, 2006

I have a library system and i need to work out the number of days from the date the book was due and the current date. Could anyone help me.

View 2 Replies View Related

Count Entries Over A Specified Number Of Days

Nov 1, 2006

Hi...

here's a good one...

I have created a database which allows people to enter in when they are off sick. They have to enter in the FIRST DAY of sickness and the LAST DAY of sickness. All of this information is stored in one big table - SICKNESS TABLE. There are no other date fields in that table.

I want to know how many people have been off for 5 TIMES OR MORE in a 365 day period (which may be say, from Oct 2005 to Nov 2006 - so not always in the same year).

I have managed to get a query that will count the number of times someone has been off; but that could be over, for example, 2 years.

How can I get it to tell me if someone has been off for 5 TIMES OR MORE in a 365 day period???

Thanks

Maria

View 7 Replies View Related

Counting Number Of Days That Contain Records

Feb 11, 2007

I've been searching the Queries Forum for help on this issue. I have a database that records loading records for a Taconite facility. Some days contain many records and on other days there are no records because of no loading activity. I create reports that group these loading records by each day, but I really need a quick and dirty report that just shows me the number of days in any month in which we had loading activity (records present). I have not figured out a way to create a query which counts the number of days in a month which contain records. I'm hope I'm explaining this well enough for someone to help me understand what to do.

Thanks ... Erik

View 5 Replies View Related

Forms :: Number Of Days Calculation

Dec 9, 2013

i have a form where I enter two dates i.e. a commence day and a final day and I also have a save button.I would either

a. have a control on the save button which pops up a message if the final day is greater than the commence day and so preventing the save record

b. Or if the final day is entered and is recognised as a date before the commence day then to pop a message saying so and preventing the save record.

View 6 Replies View Related

Enter Number Of Days In Date Field

Aug 7, 2005

At work I can enter +15 in a date field and it automatically sets the date 15 days after todays date. Our companies computer is operating on a ERP system. I would like to do that in an Access database I'm designing for a friend. Any hints.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved