Results 1 to 4 of 4
  1. #1
    legendaryclown is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Location
    Québec
    Posts
    2

    Count specific day between two date

    Hi, I'm confuse. I need to find a way to count the number of day at work between two date, but for someone who works part-time.
    Exemple : I enter two date like : 2016-09-12 to 2016-09-23 and the person worked two day and a half each week ( 2.5 => Monday, Wednesday and half a day Friday). I need to return the total number of days at work, in this case 5.

    I had try many possibility but everytime at least 1 contraint was forgot.
    Need to count a half day,
    Need to now which day is working (optional)


    Need to be interrupt by a relapse of the employee.

    Right now, i use a big fat queries but i can't correctly interrupt the count of day worked.

  2. #2
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Whether you can do this or not will depend on what data you have. If all you have is dates, you don't have enough information - you need to have the amount of time worked each day (either as hours or days, it doesn't matter).

    If you do have the data for the amount of time worked each day, then from your description, the DSum() function will work for you.


    If you give a bit more information about the data you have in your table, we can give you a better answer.

  3. #3
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,474
    Can you do it by hours instead within that date range? So if 8 hour days and they works 2 full days for 2 weeks so 4 days(32 hours) and half day for 2 weeks(8 hours) for total of 40 hours / 8hr a day = 5 days worked?

  4. #4
    legendaryclown is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2016
    Location
    Québec
    Posts
    2
    Currently, my table for progressive returns contains a primairy key, a foreign key to my table employee, the beginning date, the ending date, a string for the days, float for the number of days worked.
    I used the string, but i couldn't count a half day...

    Without using the string data, I use a DateDiff("ww",date,dateEnding) * number of days worked(float data).
    with the string, I used a script that incremented a INT everytime the days of the date was in the string. (Hard to explain :/)

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 12-17-2014, 09:51 PM
  2. Returning a specific count on a web form
    By Bobwords in forum Forms
    Replies: 9
    Last Post: 07-07-2014, 12:58 PM
  3. Specific Record Count
    By FormerJarHead in forum Queries
    Replies: 3
    Last Post: 08-23-2013, 11:02 AM
  4. Count of specific number
    By samirmehta19 in forum Access
    Replies: 3
    Last Post: 05-20-2013, 02:29 PM
  5. Count of field based on specific values
    By tazzmann67 in forum Access
    Replies: 2
    Last Post: 03-30-2011, 09:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums