• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 800
  • Last Modified:

# of Hours between 2 dates excluding weekends and holidays

Hi! To start with, my level of Access 97 is limited so any answer/solution must be in simple terms so that I would have chance in understanding it.  I have read several solutions on this website no calculating the number of days between two dates excluding weekends and holidays but all assume (I gather) better knowledge of Access than I have.  I am using a table that has a Logged in Date and an Approval Date and a separate table of the holidays observed by our company.  What I need is how do I calculate the number of workdays between these two dates.
0
Rick_4no
Asked:
Rick_4no
  • 27
  • 15
  • 7
  • +1
1 Solution
 
yhwhlivesinmeCommented:
select sum(FieldForHours)
from YourTable
where weekday(yourdate) <> 7 and weekday(yourdate) <> 1
0
 
GRayLCommented:
Assuming LoggedInDate and ApprovalDate are in myTabke, I suggest a separate table of all myDates and a check field Workday beside the dates that are workdays.  Now it is simply:

Select a.LoggedInDate, a.ApprovalDate, (count(b.myDate) * 24 - 24) as NoOfHours from MyDates b INNER JOIN myTable a on b.myDate between a.LoggInDate and a.approvalDate where  b.Workday = True

As the between function includes the boundaries you decide whether you want 8 hours between say the first and third or 16 hours.  
0
 
yhwhlivesinmeCommented:
Post what the names are of the fields you are pulling the two dates from ie: txtDate1, txtDate2, and give the names for the columns in the tables you will want.  This can be done all by SQL rather than constructing different tables
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
yhwhlivesinmeCommented:
sorry, I had not fully read your post last time, I'll take care to do that in the future.  Where are you going to get the workdays from? Just all of the days besides weekends and holidays, or actual recorded workdays, like a table full of dates that have been worked?
0
 
PreeceCommented:
If you can use VBA or VB, with some tweeking, this may work.  Populate the collection with dates from the holiday table:

Private Sub Command1_Click()
    Dim lHours As Long
    Dim sDate1 As String
    Dim sDate2 As String
    Dim sTempDate As String
    Dim lX As Long
    Dim colHolidays As Collection
   
    Set colHolidays = New Collection
    ' populate collection with holiday dates
    colHolidays.Add "5/10/2005"
   
    ' set dates
    sDate1 = "5/9/2005"
    sDate2 = "5/16/2005"
       
    ' get initial total hours
    lHours = DateDiff("h", sDate1, sDate2)
   
    ' check for weekends and holidays
    sTempDate = sDate1
    Do
        sTempDate = DateAdd("d", 1, sTempDate)
        ' check for weekend
        If DatePart("w", sTempDate) = 1 Or DatePart("w", sTempDate) = 7 Then
            lHours = lHours - 24
        Else
            ' check for holiday
            For lX = 1 To colHolidays.Count
                If sTempDate = colHolidays(lX) Then
                    lHours = lHours - 24
                    Exit For
                End If
            Next
        End If
    Loop While sTempDate <> sDate2
   
    Set colHolidays = Nothing
   
    MsgBox lHours
End Sub


Hope this helps!
Preece
0
 
yhwhlivesinmeCommented:
you can do something like this:

select approvedDate - loginDate - (datediff("ww",approvedDate,loginDate)*2) -

(Select sum(holidayID) from tblLoginApproved, tblHoliday where approvedDate<=holidayDate and loginDate>=holidayDate)

from tblLoginApproved

I think that would work, otherwise you can split it up into two queries.

The datediff function above counts the number of sundays in between the two dates provided and therefore must be multiplied by 2 to include saturdays as well.
0
 
Rick_4noAuthor Commented:
yhmhlivesinme

I follow you up in the first part of the equation which gives me the workdays between the two days but am totally lost on the second part which excludes holidays.  Sorry for my ignorance but Access is not my strength.   I have two tables (of many) but the two that have the required information is tblWorking Data (which has the LogInDate and the ApprovalDate) and tblHolidays which lists all the holiday days.  Could you redo the below exactly how I would use these tags - thanks

(Select sum(holidayID) from tblLoginApproved, tblHoliday where approvedDate<=holidayDate and loginDate>=holidayDate)

from tblLoginApproved
0
 
yhwhlivesinmeCommented:
Rick, I won't be in the office on friday, I'll be back on monday, sorry for any inconvenience, I'll try and get back with you on monday
0
 
GRayLCommented:
Rick 4no:  Using the yhwhlivesinme solution, for a start date of tomorrow, Saturday, 14 May 2005 and and ending date of Sunday, 22 May 2005 I get 4 days or 96 hours.   I believe there are 5 working days or 120 hours between those two dates.  My point is if you are going to maintain a Holiday table, why not maintain an WorkDays table with fields fldDate and fldIsWorkDay instead and mark those days that are workdays.  Then the calculation becomes dead easy.  

Select a.LoggedInDate, a.ApprovalDate, Count(b.*) * 24 from WorkDays b. InnerJoin tblWorkingData a on b.fldDate between a.LoggedInDate and a.ApprovalDate WHERE b.fldDate between a.LoggedInDate and a.ApprovalDate;

If by hours you meant 8 working hours per day change 24 to 8.

Generating the table is easy.  I imagine you have Excel so creating a sequence of consecutive dates for the next 10 years is a snap. Import the table to Access, add the field WorkDay, and run this Update:

Update WorkDays set fldIsWorkDay = True for weekday(fldDate) between 2 and 6;

Now go thru the table and unmark those weekday dates that are holidays or are taken as holidays because the holiday fell on a weekend.  Now you have a system that is not sensitive to what day you call the first day of the week.  Anyway that's my 2 cents worth.

0
 
Rick_4noAuthor Commented:
GrayL:  Our company is not open Saturdays or Sundays so there would never be a start date or approval date on the weekends unless there is an inputting error.  I agree that using the yhwhlivesinme solution would not cover situations where the start and approval dates were on weekends.  One must remember that I am an Access novice, not farmilar with code, and it appears to me that maintaining a holiday table with only 10 days a year is a simplier way to go.  As mentioned above, I follow the first part of the yhwhlivesinme solution which eliminates weekends and I got this to work in my database, Ijust do not understand the second part of the solution which eliminates holidays.  I keep getting syntax errors.
0
 
PreeceCommented:
Hey guys, has anyone had a look at my suggestion?  I know it is not written in sql, but it could be incorporated in VBA, and it takes care of both requirements...  

; - )
Preece
0
 
GRayLCommented:
Preece:  He did write: "One must remember that I am an Access novice, not familar with code, ..."

Rick 4no:  "Our company is not open Saturdays or Sundays ..."  okay, but get behind just once, it's amazing how many rules change.  See ya!
0
 
PreeceCommented:
True, but what better time to learn than the present?  ; - )
0
 
PreeceCommented:
And my suggestion is sooooooooo simple!
0
 
Rick_4noAuthor Commented:
Preece:  To a novice, your code appears very complicated - it may not be but but sure looks like it.
0
 
PreeceCommented:
My apologies!  
0
 
yhwhlivesinmeCommented:
Rick: Can you post your table names and their field names (indicate which is the primary key)

Rick and GRayL: if you ever did start having startdates on a saturdays, the code would be easy enough to modify to include all saturdays.
0
 
Rick_4noAuthor Commented:
yhwhlivesinme: Is the code toinclude all Saturdays would just meed to be changed to not multiply by 2 in the fidst part of the equation.

My two tables are Fast Tacker (one that has the fields LogInDate & ApprovalDate - -this table has over 100 fields with a Primary Key being TrackerNumber) and Holiday Dates (fields on this table are HolidayName, HolidayDate and  #ofDays )  I have not set a Primary Key in the Holiday Dates table which may be one of my problems - the other may be that I have not linked these two table together as I do not have a common field.  Again I must apologize for my inexperience in Access.
0
 
yhwhlivesinmeCommented:
yep, just take the *2 out of the query and you will only exclude sundays. I'll get back to you on the tables and the query to get rid of the holidays
0
 
yhwhlivesinmeCommented:
you do not have to link the tables to do this query and you do not need to have a primary key, although something like HolidayID would probably be beneficial for other applications.
0
 
yhwhlivesinmeCommented:
I believe you will need to change the holiday table somewhat.  having that number of days column will complicate things a lot, I would reccomend just putting every day that is a holiday, so if you have 2 days off for July 4th, then:

7/4/05 4th of July
7/5/05 4th of July
0
 
Rick_4noAuthor Commented:
Okay, I have elimimated the # of days column on the Holiday Table, added a column HolidayID and made it the Primary Key, and have put every day that is a holiday day in the table.
0
 
yhwhlivesinmeCommented:
Alright rick, I got it for you, you are going to have to create 3 queries (you could do it all in one, but it's simpler to do it this way:

Name this qryNoWeekends:
SELECT [Fast Tacker].ApprovalDate-[Fast Tacker].loginDate-(DateDiff("ww",loginDate,approvalDate)*2) AS NumDays, [Fast Tacker].TrackerNumber
FROM [Fast Tacker];

Name This qryNumOfHolidays:
SELECT Count([Holiday Dates].[Holiday Date]) AS [CountOfHoliday Date], [Fast Tacker].TrackerNumber
FROM [Fast Tacker], [Holiday Dates]
WHERE ((([Fast Tacker].loginDate)<=[Holiday Dates].[Holiday Date]) AND (([Fast Tacker].ApprovalDate)>=[Holiday Dates].[Holiday Date]))
GROUP BY [Fast Tacker].TrackerNumber;

Name this qryTotalDates:
SELECT qryNoWeekends.NumDays- nz(qryNumOfHolidays.[CountOfHoliday Date],0) AS TotalDates
FROM qryNoWeekends LEFT JOIN qryNumOfHolidays ON qryNoWeekends.TrackerNumber = qryNumOfHolidays.TrackerNumber;


You can just copy the SQL in and save it as what I said above, it should all work, I tested it on my machine and created a dummy of your database
0
 
yhwhlivesinmeCommented:
To explain what I did, the first query does what we talked about above and removes all the weekend days from the sum of the days.

The second query sums up all the holidays that are in between the two dates (including the dates themselves.

Then the third query brings it all together and references the other two queries for the values.  and takes the total number of days without weekends and subtracts the number of holidays that are in there as well.
0
 
yhwhlivesinmeCommented:
Use this instead of what I put up there for qryNumOfHolidays:

SELECT Count([Holiday Dates].[Holiday Date]) AS [CountOfHoliday Date], [Fast Tacker].TrackerNumber
FROM [Fast Tacker], [Holiday Dates]
WHERE [Fast Tacker].loginDate<=[Holiday Dates].[Holiday Date] AND [Fast Tacker].ApprovalDate>=[Holiday Dates].[Holiday Date]
and weekday([Holiday Dates].[Holiday Date]) <>1 and weekday([Holiday Dates].[Holiday Date])<>7
GROUP BY [Fast Tacker].TrackerNumber;


This takes the holiday out if it falls on a weekend, that way it's not double counted, so only 1 day is taken out of the sum if your holiday falls on a weekend.

By the way, how are you putting your holidays in the database? are you putting them in every year? or what? When I put them into my dummy database I did something like this:

12-25-05  Christmas
7-4-05  4th of July

but then you would have to put them in every year!
0
 
Rick_4noAuthor Commented:
I am putting in the holidays only as the workday that the holdiday is actually being observed so to eliminated the ones that fall on weekends therefore I think your first Number of Holdays will work.  I have to leave work for the rest of the day and will be trying this solution tomorrow and will get back to you.  Thanks for your patience.
0
 
yhwhlivesinmeCommented:
no problem, I suggest adding that second query anyways for good measure, it won't hurt anything if no holidays do fall on weekends
0
 
PreeceCommented:
It would make sense to check for weekend first, then if not a weekend, check for holiday.  If it does fall on a weekend, then don't check for holiday.  That way you can have all of the holidays in your table, and not exclude some because they fall on a workday.  

Preece
0
 
Rick_4noAuthor Commented:
yhwhlivesinme: Hi! I am finally able to get back to my office - I feel very inept on this application as I really cannot get the counting of the holidays to work and maybe it is that I have not explained myself properly.  My main Table is the Fast Tracker which holds the lion share of my information.  Included in this table are:
 Primary Key = TrackerNumber
LogInDate
ApprovalDate
Underwriter (plus a lot of customer information as in name address, loan amount, etc)
My first query selects all submissions that were logged in between two specific dates and calculates the time between the date logged in and the approve date (subtracting the weekends as per the first part of your solution (done as an Expression) - and works very well) This query provides me with approximately 500 lines of data showing the individual loans worked on by each underwriter during that period of time with the Logged in date, the approval date and the  calculated amount of time it took for the approval. (without correcting for holidays)
The secondary table is the Holiday Dates table with:
Holiday Name
Date (Actual workday that the holiday is observed)
Counter (=1)

Cannot seem to include your second part of the solution in any expression form that seems to work - Help!
0
 
PreeceCommented:
Rick:  Hey, it's just me again!  I know that a vb solution was not quite what you were looking for, but if you were to just give it a try, you'd see that it works for both requirements.  With a little modification, it may be viable!  I'd even be willing to split the points with yhwhlivesinme if you could get my code to work for you...just a thought...

Preece
0
 
yhwhlivesinmeCommented:
Rick,

Thanks for your response, you need to create 3 queries as I instructed above, the first two are independant and the third brings them all together, I tested it on sample data in a database of my own, please let me know specifically what problems you are having.

Let's get this working first, and I'll show you (if you don't already know) how to add in functionality for getting the results for between two dates.

By the way, I believe preece's code will work as well, but I generally don't use vb solutions where sql can suffice, but that's just me, there are plenty of programmers who would do it differently. vb can become slow when presented with complex problems.
0
 
yhwhlivesinmeCommented:
Here are the three queries you will need:

---------------Name this qryNoWeekends-------------------------
SELECT [Fast Tacker].ApprovalDate-[Fast Tacker].loginDate-(DateDiff("ww",loginDate,approvalDate)*2) AS NumDays, [Fast Tacker].TrackerNumber
FROM [Fast Tacker];

---------------Name This qryNumOfHolidays-------------------------
SELECT Count([Holiday Dates].[Holiday Date]) AS [CountOfHoliday Date], [Fast Tacker].TrackerNumber
FROM [Fast Tacker], [Holiday Dates]
WHERE [Fast Tacker].loginDate<=[Holiday Dates].[Holiday Date] AND [Fast Tacker].ApprovalDate>=[Holiday Dates].[Holiday Date]
and weekday([Holiday Dates].[Holiday Date]) <>1 and weekday([Holiday Dates].[Holiday Date])<>7
GROUP BY [Fast Tacker].TrackerNumber;

---------------Name this qryTotalDates-------------------------
SELECT qryNoWeekends.NumDays- nz(qryNumOfHolidays.[CountOfHoliday Date],0) AS TotalDates
FROM qryNoWeekends LEFT JOIN qryNumOfHolidays ON qryNoWeekends.TrackerNumber = qryNumOfHolidays.TrackerNumber;


I am almost positive that this will work, let me know what specific problems you are having
0
 
Rick_4noAuthor Commented:
Firstly - to get the first part of the solution, I built an expression in a query as follows: (the tags are actual and not the ones that I was trying to keep simple)

Expr1: [Fast Tracker Data - Working Table]![Verbal_Close]-[Fast Tracker Data - Working Table]![Date/Time Logged]+(DateDiff("ww",[Fast Tracker Data - Working Table]![Verbal_Close],[Fast Tracker Data - Working Table]![Date/Time Logged])*2)

Now I have tried to use SQL view as follows without success as it gives me a Syntax error on the AS

SELECT [Fast Tracker Data - Working Table]![Verbal_Close]-[Fast Tracker Data - Working Table]![Date/Time Logged]+(DateDiff("ww",[Verbal_Close],[Date/Time Logged)]*2) AS NumDays, [Fast Tracker Data - Working Table].[AutoNumber]
FROM [Fast Tracker Data - Working Table]

I guess this is the first hurdle?

preece: I am also attempting your VB code in a module and if I can get it to work as well - I will split points (increased as above)
0
 
yhwhlivesinmeCommented:
try taking the ! out of your query and replace them with "." (no quotes)

Give me the exact table names and table fields, I will write the sql and you can just copy it in.

Next time you design a table do not have any spaces, dashes etc, just make it something like this:

tblFastTrackerDataWorkingTable

or something, but you should always put a prefix on the name to expressly tell the users (or other developers) what it is, I use the following

Objects
tbl = Table
frm = Form
mac = Macro
mod = Module
qry = query

Controls:
txt = Text Box
cmbo = Combo Box
optn = Option Group
lbl = Label
0
 
yhwhlivesinmeCommented:
Copy this into a new query's sql and tell me if it works:

SELECT [Fast Tracker Data - Working Table].[Verbal_Close]-[Fast Tracker Data - Working Table].[Date/Time Logged]-(DateDiff("ww",[Date/Time Logged],[Verbal_Close])*2) AS NumDays, [Fast Tracker Data - Working Table].TrackerNumber
FROM [Fast Tracker Data - Working Table];

if it does save it and call it qryNoWeekends
0
 
yhwhlivesinmeCommented:
In the query you listed above, you have a parenthesis inside a square bracket right before the "AS", see below for how it should be:

SELECT [Fast Tracker Data - Working Table]![Verbal_Close]-[Fast Tracker Data - Working Table]![Date/Time Logged]+(DateDiff("ww",[Verbal_Close],[Date/Time Logged])*2) AS NumDays, [Fast Tracker Data - Working Table].[AutoNumber]
FROM [Fast Tracker Data - Working Table]
0
 
Rick_4noAuthor Commented:
Tried both the above in a new query and get "compile error in query expression"

This database has been in existence for over 5 years and is not a creation of mine so no control of the name tags - I am just trying to use the massive amount of tracking data collected to produce efficiency reports.
0
 
yhwhlivesinmeCommented:
are you copying this into the sql view or putting it in an expression? you need to copy it into your sql view.  Also need the full names of the tables and their crucial fields
0
 
Rick_4noAuthor Commented:
I am back at work now and have some time to spend on trying to solve this problem of subtracting holidays.

Anyway the database has a huge main table "Fast Tracker Data - Working Table" & there is no Primary Key.
There are over 100 fields for each AutoNumber - all named by previous holders/creators of the database.
       Pertinent fields for my queries are:    "Date/Time Logged"   -  Date and Time Loan Submission was received
                                                             "Verbal_Close"          -  Date and Time email was sent approving/declining
                                                             "AutoNumber"           - Tracker number

Second table is "Holidays Observed" - again no Primary Key - this a table that lists all the dates that statutory holidays are observed by our company.  There are only 3 fields in this table:
                                                              "ID"                         - AutoNumber
                                                              "Holiday Name"         - Official Name of CND holiday
                                                              "Holiday Date"           - Date holiday is observed  (pertinent field)

My queries select all the loan submissions that were Logged-in between 2 specific dates inputted by pop-up boxes and this works fine.  Depending on the dates selected, there can be upwards of 15,000 loan submissions selected, each having different "Date/Time Logged" and/or "Verbal_Close" Date.  As mentioned previously, I have successfully used "yhwhlivesinme" s  code (Datediff("ww".....) as an expression in the query to determine the number of weekdays between these dates.

What I can't seem to grasp is the elimination of any holiday date that is between this 2 dates.  There does not seem to be a logical way of tying the "Holidays Observed" table with the "Fast Tracker Data - Working Table" table I either get errors or a mulitple of data for each date that is in the "Holiday Observed" table.
           
      yhwhlivesinme hopefully you can understand my problem now
     
      Preece, I have tried your VB but unfortunately without success.  


 
0
 
yhwhlivesinmeCommented:
rick, open up a new query, go to SQL view and copy this sql into it...let me know if it works, I need to know if I'm on the right track here with your field/table names...

SELECT [Fast Tracker Data - Working Table].[Verbal_Close]-[Fast Tracker Data - Working Table].[Date/Time Logged]-(DateDiff("ww",[Date/Time Logged],[Verbal_Close])*2) AS NumDays, [Fast Tracker Data - Working Table].TrackerNumber
FROM [Fast Tracker Data - Working Table];
0
 
Rick_4noAuthor Commented:
Placed your SQL into a new query and yes it calculates the time between the Date/Time Logged and Verbal_Close.

Pop-up box requests a Tracker Number and pplaces this number in all the rows of the detail.  This is Expr1 column.
0
 
yhwhlivesinmeCommented:
?? pop-up box requests a tracker number?? what do you mean? why does it request a tracker number? all of the fields above should be valid fields in a table, did you alter my sql? or change the query in any way?
0
 
yhwhlivesinmeCommented:
if you have access to an FTP site, you can upload your Database file and I can look at what you're looking at
0
 
Rick_4noAuthor Commented:
I was not exactly correct in my last email - the pop-up box requests to "Enter Parameter Value - Fast Tracker Data - Working"

The SQL was a direct copy from your comments 6/15/05 - this created a NUmDays field as well as an Expr1 field "Expr1: [Fast Tracker Data - Working Table].TrackerNumber"

Sorry do not access to an FTP site.
0
 
yhwhlivesinmeCommented:
SELECT [Fast Tracker Data - Working Table].[Verbal_Close]-[Fast Tracker Data - Working Table].[Date/Time Logged]-(DateDiff("ww",[Date/Time Logged],[Verbal_Close])*2) AS NumDays, [Fast Tracker Data - Working Table].Autonumber
FROM [Fast Tracker Data - Working Table];

sorry, I didn't change one of the fields, the query should not ask you for any data input...try the above query, just directly copy it into a new query and run it....tell me if any error occurr, any popup boxes come up and if the data appears to be correct
0
 
yhwhlivesinmeCommented:
if this is getting frustrating for you, you can zip up the database file and e-mail it to me, just let me know
0
 
Rick_4noAuthor Commented:
copied inot query and this has eliminated the pop-up box requesting Parameter Value and the calculation is the time between the Date/Timed Logged and Verbal_Close (less weekends)

This is not getting frustrating to me as it looks like we are getting to the solution of my problem.  The only frusttrating part is my lack of knowledge of Access.  

The actual size of the database is over 40 Meg and has a separate front end form (4.2 meg) located on a different server that is used to populate the tables.  Most of the information would be private and would countervene the Canadian Privacy Act to povide anyone with the data.

Would a copy of the structure of the two tables (Fast Tracker Data - Working Table & Holidays Observed) help?  I could mockup  a couple of lines of data.  If you think this would help, please provide your email address.
0
 
yhwhlivesinmeCommented:
It will probably take too much time to do that, we can probably work through it by then... so if I'm right, that last query worked as expected...

I've modified the other queries that I wrote with the new field names:

---------------Name this qryNoWeekends-------------------------
SELECT [Fast Tracker Data - Working Table].[Verbal_Close]-[Fast Tracker Data - Working Table].[Date/Time Logged]-(DateDiff("ww",[Date/Time Logged],[Verbal_Close])*2) AS NumDays, [Fast Tracker Data - Working Table].Autonumber
FROM [Fast Tracker Data - Working Table];

---------------Name This qryNumOfHolidays-------------------------
SELECT Count([Holidays Observed].[Holiday Date]) AS [CountOfHoliday Date], [Fast Tracker Data - Working Table].Autonumber
FROM [Fast Tracker Data - Working Table], [Holidays Observed]
WHERE [Fast Tracker Data - Working Table].[Date/Time Logged]<=[Holidays Observed].[Holiday Date] AND [Fast Tracker Data - Working Table].[Verbal_Close]>=[Holidays Observed].[Holiday Date]
and weekday([Holidays Observed].[Holiday Date]) <>1 and weekday([Holidays Observed].[Holiday Date])<>7
GROUP BY [Fast Tracker Data - Working Table].Autonumber;

---------------Name this qryTotalDates-------------------------
SELECT qryNoWeekends.NumDays- nz(qryNumOfHolidays.[CountOfHoliday Date],0) AS TotalDates
FROM qryNoWeekends LEFT JOIN qryNumOfHolidays ON qryNoWeekends.Autonumber = qryNumOfHolidays.Autonumber;



let me know how they work...again simply copy the sql in and test the queries... the last query (qryTotalDates) references the other two queries, so you may want to run the first two first and make sure they work
0
 
yhwhlivesinmeCommented:
I didn't rigourously look at the queries, I just did a find/replace, so we'll work on them later if they don't work
0
 
Rick_4noAuthor Commented:
Copied all three SQL's in separate queries and tested same with SUCCESS.  It looks like tbe weekends and holidays are being eliminated.   One observation is on one line of data in the qryNumOfHolidays where the Verbal_Close was erroneously inputted as 4/28/2014 instead of 4/28/2004 and result was 10 days.
0
 
Rick_4noAuthor Commented:
Just thought about my last comments and the results of the queries is correct.  I am not thinking right  (which is not unusual) the 10 day answer is correct as there are 10 days in my table.  thank you very, very much for your time.
0
 
yhwhlivesinmeCommented:
no problem man, I'm glad that you you got your solution... let me know if you have any more questions, I'll stay subscribed to this question!
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 27
  • 15
  • 7
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now