How to excluse weekend hours from total hours of project?

I have made all settings dynamic,but now the problem is the total hours of the project is calculated dynamically.So,for example 40 hrs,even its adding saturday and sunday time.But on weekend the Project tasks are not done,so how do i get the total hours excluding the weekend hours.I am also not able to give static total hours time in project parameter,so that I can make it to 40+12+12 for weekends,if they are clashing.