I am using following code for Robert's Posted Code (Url:http://forums.asp.net/t/1142378.aspx) But this is for only calculate weekends saturday and sunday can any one tell me how

I get Number of days between given two dates Monday to Friday.

private const int MONDAY = 1;
private const int TUESDAY = 2;
private const int WEDNESDAY = 3;
private const int THURSDAY = 4;
private const int FRIDAY = 5;
private const int SATURDAY = 6;
private const int SUNDAY = 7;
/// <summary>
/// Observe that the method calculates by including the start day, but excludes the end day
/// </summary>
/// <param name="startDate"></param>
/// <param name="endDate"></param>
/// <returns></returns>
private void GetWeekendDaysBetween(DateTime startDate, DateTime endDate,out int saturdays,out int sundays)
{
saturdays = -1;
sundays = -1;
if (endDate < startDate)
return;
TimeSpan timeBetween = endDate.Subtract(startDate);
int weekendsBetween = timeBetween.Days / 7;
sundays =

**View Complete Post**

## How to create a calculation in a list - Calculate the number of days between two dates

I have a calculated column in a list called

Days Open.This column contains the number of days between today (Sysdate) and another column called the Effective Date. Therefore, if Sysdate is 11/16/2010 and the Effective Date is 10/14/2010, how do I calculate the number of days between the two dates?I tried using this formula:

=TEXT(Sysdate-[Effective Date],"h")and then I tried=INT(Sysdate-Effective Date) & TEXT(Sysdate-Effective Date, ":hh:mm")Neither formula worked. I hope it is something real simple that I am missing here. Any help you can provide will be highly appreciated!