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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Work time queries

Status
Not open for further replies.

dommales

MIS
Aug 10, 2001
10
GB
I have a query that I wish to construct that adds 2 hours to a gerneral time format. This is DD/MM/YY HH:MM

The only issue is that it must only add working hours.

It must consider that the office is only open from 09:00 till 17:30 and only during the week.

Hence if the time is 16:30 on a Friday, the result must be Monday 10:30 (but the day in digits)

Many thanks in advance

Dom
 
see function DateAdd John Fill
1c.bmp


ivfmd@mail.md
 
Thanks for the help John, but this function does not do what is required, Is it true that Access does not have any in built functions to recognise work days and work time.

Will I have to construct a VB script to acheive my requirements?

Can anyone shead any light on this?

Dom
 
]Is it true that Access does not have any in built functions to recognise work days and work time.

YES.

Will I have to construct a VB script to acheive my requirements?

YES.


MichaelRed
mred@att.net

There is never time to do it right but there is always time to do it over
 


Should be easy to code. If the result is greater than 5pm then add 18 hours instead of 2.

Would do it but I hate dates and times even more.

Stew "Even a stopped clock tells the right time twice a day."
 
Actually, ther is a LOT of stttuuuuuufffffffffffff to consider. What about holidays in the middle of the week? How would you calculate this for someone who goes on Vacation (for X days), when the period starts the day before the first day of vacation - but extends to any time following the vacation (vacation could also be ANY 'absence', [Sick | Lame | Lazy | "Personal Time"])?

These are the reasons I don't want to get into "it".

MichaelRed
mred@att.net

There is never time to do it right but there is always time to do it over
 
Thanks for the help guys,

I have actually got around the problem without any programming by using lots of queries and reference tables.

It is a bit of a nightmare but it seems to be doing the job, from what testing I have done.

And I have a major headache now.....

Thanks again

Dom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top