Click here to Skip to main content
15,898,134 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Folks.

I'm looking for a way to determine the difference between two dates in SQL.
A normal DATEDIFF statement won't cut it because I need to excluded non working Hours and days Namely Weekends and any time between 16:00 - 7:00.

Something similar to the NETWORKDAYS function in excel.
-----------------------------------------------------------
I wrote my own custom function to do this
Posted
Updated 2-Dec-10 21:50pm
v2
Comments
Rajesh Anuhya 3-Dec-10 6:10am    
DATEDIFF function is works for Non-workig days also..,
[no name] 3-Dec-10 7:59am    
I wrote my own custom function to do this

1 solution

There is nothing I know of that will do this in either SQL or the .NET Framework.

I think you're going to have to write your own solution to this.

Nick
 
Share this answer
 
Comments
Dalek Dave 3-Dec-10 4:18am    
Looks like some scripting for him!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900