Results 1 to 3 of 3
  1. #1
    christ2000 is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Jan 2018
    Posts
    45

    Question How Calculate Hours By week

    Hello guys, I need to access allow me calculate hours by week, I have two fields with dates, and then another field that show me the total hours in each week, and not counts the hours that are from deferent weeks

    thanks

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,129
    You need to define the week number for each date.
    Is your week Sun to Sat? Or something else
    You will use built in access functions for Week, Weekday.
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    make a form, on it are 2 unbound data fields...txtStartDate and txtEndDate
    user enters the start date of the week into txtStartDate
    then code can set the end date txtEndDate = dateadd("d",6,txtStartDate)

    now run a query using these: (and calc elapsed time from the 2 fields in the table)

    select *, DateDiff("h",[start],[end]) as ElapsedTime from table where [date] between forms!myForm!.txtStartDate and forms!myForm!.txtEndDate

    sum the time in a report or sum query.

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

Similar Threads

  1. timer - how to calculate hours?
    By rwahdan@gmail.com in forum Access
    Replies: 6
    Last Post: 02-15-2018, 07:48 PM
  2. Calculate working hours
    By Mark256 in forum Queries
    Replies: 3
    Last Post: 09-09-2014, 08:17 PM
  3. how to calculate hours
    By ultra5219 in forum Queries
    Replies: 2
    Last Post: 05-23-2013, 04:22 PM
  4. How to Calculate days of the week
    By djclntn in forum Database Design
    Replies: 3
    Last Post: 02-26-2011, 11:10 PM
  5. calculated hours per week in a query Help???
    By manos39 in forum Queries
    Replies: 0
    Last Post: 02-16-2011, 04:17 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