Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Working Days in Function?

Status
Not open for further replies.

Dklein

IS-IT--Management
Nov 9, 2001
33
US
Hi,

I have a query that produces a field worked out on DateDiff by hours and shows me how many hours difference there is between a DATE RECEIVED and a DATE MODIFIED fields. The only trouble is is that I want to make this function use working hours in how many hours have elapsed.

An example is if DATE RECEIVED was 01/01/2003 09:00:00 and DATE MODIFIED was 01/01/2003 17:31:00 then I want it to show 7 hours and not 8? And likewise if DATE RECEIVED was 01/01/2003 15:00:00 and DATE MODIFIED was 02/01/2003 10:00:00 I want it to show 4 hours as the working hours are only 09:00 until 18:00 and not 24 hours.

I would apprecaite any guidance you could give.

Many thanks
Dave.
 
I'm sorry, this is in Access xp.

Thanks
Dave
 
use the 'advanced' search. There are a few threads on hte toipic, and (I am sure!) at least one actually has a complete procedure included.


Thread701-300744
Thread181-55928
Thread181-172327
Thread222-55210

are four of hundreds of threads I found using "All Words" with "Time" & "difference" searching through threads.

Review threads of your choice add liberal doses of Help files and concoct any number of variations on the theme.



MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Sorry Michael,

I'm not to good at the vba procedure lark. the ones I have looked at don't seem to fit what I want. I would really appreciate any guidance.

Many thanks
Dave
 
Without some work on you part, the only recourse would appear to be contimue searching. I'm sure there is no intrinsic function in VB(A) which comes even close to what you describe. Within the cited references, there are several ways to get to at lesast the number of specific 'work days' within a period. All of them require at least setting up some schema denoting the NON-working days and most include at least rudimentary use of VB/A. Calculating the actual work time for a day (or a part thereof) would generally be quite similar. I am reasonably sure that at least one such routine has been posted on this site.




MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top