Murray Brown
asked on
VB.net SQL Count working days between two days
Hi
I am using the following SQL query to pull data from a table called performance. I also want to include a column that
calculates the difference between the [From Date] and [To Date] excluding weekends. How I do this without having to add a SQL function as I am using the SQL statement in VB.net code? Thanks
I am using the following SQL query to pull data from a table called performance. I also want to include a column that
calculates the difference between the [From Date] and [To Date] excluding weekends. How I do this without having to add a SQL function as I am using the SQL statement in VB.net code? Thanks
Select Distinct [Hole Number], Min([Date])As [From Date], Max([Date]) As [To Date], Max([Drilled To]) As [Depth Drilled]
From Performance Group By [Hole Number]
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can try adding a column with the DateDiff(day,max(date),min (date)) as [date diff]
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks very much