Hi,

I'm just starting to try and get my head around this one for someone who wants the resultant code implemented like 'yesterday'.

We have a table custom populated with all the dates in the year that are not working days. Consquently we can't just discount Saturdays and Sundays as non working days. We also have custom Public and Business holidays included.

From a given input date and number of working days into the future, the users want a function that will return the actual working day date - referencing their custom list of non working days.

Anyone any ideas how to best formulate the resultant function for best performance (over neatness!)?

The chances are users will be using the function to perform query results for an input set of hundreds of thousands of rows.

- Tony.