Go Back   Access World Forums > Microsoft Access Discussion > Queries

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 11-19-2008, 08:43 AM   #1
eddie442
Registered User
 
Join Date: Jan 2005
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
eddie442 is on a distinguished road
Working days/hours in a query

I hope someone can help me with this query.

Our admin team have a database where they store all requests (stationery orders etc). Dependant on the request, they have a certain amount of time in which to complete it. It could be 24 hours, 5 working hours, 1 working hour etc. The times and dates are stored in the following fields;

RequestDate
RequestTime
CompletedDate
CompletedTime

I should say here that their working day runs from 09:00-17:00 Mon-Fri.

I can create a query easily enough if the times are within working hours/days. My problem is that if a request comes in after 12:00 noon, they have until 17:00 the following day to complete it. How can I legislate for weekends if this request falls on a Friday? The same issue occurs for requests that have to be answered inside 5 hours. If the request comes in at say 16:00, then they have until 13:00 the next day to complete it. How can I take into account the working hours and non-working days for these?

I'd be really grateful for any help!

Many Thanks
Dave

eddie442 is offline   Reply With Quote
Old 11-19-2008, 09:19 AM   #2
Rabbie
Super Moderator
 
Rabbie's Avatar
 
Join Date: Jul 2007
Location: Returning to Scotland
Posts: 5,906
Thanks: 110
Thanked 76 Times in 68 Posts
Rabbie is a jewel in the rough Rabbie is a jewel in the rough Rabbie is a jewel in the rough
Re: Working days/hours in a query

There have been procedures posted on these forums to calculate "Working days" Try searching for this info. These procedures will also let you ignore Bank Holidays/Public Holidays etc
__________________
The best solution is the simplest one that meets all requirements.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Rabbie is offline   Reply With Quote
Old 11-20-2008, 01:11 AM   #3
eddie442
Registered User
 
Join Date: Jan 2005
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
eddie442 is on a distinguished road
Re: Working days/hours in a query

Cheers, thanks for that, I've found what I need. Was panicking yesterday and not thinking clearly!

eddie442 is offline   Reply With Quote
Old 11-20-2008, 01:28 AM   #4
Rabbie
Super Moderator
 
Rabbie's Avatar
 
Join Date: Jul 2007
Location: Returning to Scotland
Posts: 5,906
Thanks: 110
Thanked 76 Times in 68 Posts
Rabbie is a jewel in the rough Rabbie is a jewel in the rough Rabbie is a jewel in the rough
Re: Working days/hours in a query

Glad to hear you have found what you need. Happy to have been of help

__________________
The best solution is the simplest one that meets all requirements.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Rabbie is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding a Auto increment Text/Number elliotth123 Tables 13 05-17-2013 08:30 AM
cannot recreate a query after deleting it in vba ciqala Modules & VBA 2 08-25-2005 05:11 AM
Crosstable query returns too many records Palsam Queries 2 03-09-2004 11:41 AM
Query not working when add a field - Please Help durdle Queries 1 08-05-2003 10:53 AM
empty fields causing problems Christos Queries 2 04-27-2003 06:31 PM




All times are GMT -8. The time now is 11:29 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World