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

Setting a date, excluding weekends

Status
Not open for further replies.

smartglass

IS-IT--Management
Mar 14, 2006
33
GB
Hi there:
I have a database that reports on production batches, with a specified batch date. Some batches cannot be made on the date specified so I want to reschedule forwards by 1 day those that are not complete.
However I need to exclude weekends and bank holidays. I am using a separate, joined, table to store dates and this table holds day of week . Saturday sunday and bank holiday are set at 6,7, and 9.
So technically I should be able to use a TCursor to locate the date in the dates database that matches today in the batch database, and move to the next date (where DOW <6) and reset the batch date with the next active date. I am struggling with the 'where' bit...Could anybody point me to the right code ?
Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top