i need to know if, given a birth date, a person has more than x years. Thats mean, the client must entry a date in a textbox and i need to know if the persona has more than 18 years.

Hi Guys
I need the count of business days between two dates
Date1, Date2 i need the count only business day (exclude sartuday&sunday)
If date1 is null or nothing i need to pass 0
If date2 is null or nothing i need to pass 0
help on this

I need to be able to figure out the number of Saturdays and the number of Sundays between two dates. I know that I can do this by looping through the series of dates between the start date and end date. Years ago I saw a piece of code that an ex-co worker wrote that accomplished this task using a formula. The formula was extemely effecient. Unfortunately I no longer have access to this code. Does anyone have an algorithm that will perform this calculation that I can make use of?
Thanks

Dear All,
i got the task to find no of days between two dates n Two given times Using C#
I have four fields( columns) Such as follows,
Arrival Date, Arrival Time, Leaving Date and Leavingtime.
Example:
Leaving Date-24/08/2010,Leaving Time- 08:00 , Arrival Date- 12/09/2010 ,Arrival Time-16:00,
From the above Example i need to find No of days.
Note :
Days should calculate from Leaving time to arrival time (with reference to above example it means if he starting at 8:00 o clock(24/08/2010) in the morning the next day eight o clock will be one day(8:00/ 25/08/2010))
Thanx in advance

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 =

I am in the process of creating a calendar. This calendar is to track leave hours for employees. For example if a person takes leave for 2.5 days then the formula would calculate 8hrs per day and 4 hours for half a day = 20hrs. I have
part of the formula I believe "=TEXT([End Time]-[Start Time],"h")". The problem is that it does not count multiple days and just not working right. Any advice would help.Qjm

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!

Let's take a quick look at the object keyword first. I'm not going to talk a lot about it because it's been around since C# 1.0. This keyword is nothing more than a shortcut for System.Object, which is the root type in the C# class hierarchy. (However, as Eric Lippert pointed out in his blog post, not everything in C# derives from object.) This is a powerful mechanism, since you can assign almost any value to instances of this type.

This page presents a variety of calculations for latitude/longitude points, with the formulÃÂ¦ and code fragments for implementing them.

All these formulÃÂ¦ are for calculations on the basis of a spherical earth (ignoring ellipsoidal effects) - which is accurate enough* for most purposes. [In fact, the earth is very slightly ellipsoidal; using a spherical model gives errors typically up to 0.3% - see notes for further details].

## Need function to find difference between two dates

Hi all

I need a function written in vb to find the exact month difference between two dates.

For example

Start Date : 01/01/2010

End Date : 15/02/2010

then the difference value should be like this 1.5 i.e i need the difference in decimal value.