The following is a piece of code which does date
comparison after taking a string date and converting
it to a date object. Hope it helps :-
DateTime dJoinedAfter =
Convert.ToDateTime(sJoinedAfter);
iDay = dJoinedAfter.Day;
iMonth = dJoinedAfter.Month;
iYear = dJoinedAfter.Year;
sAmericanDate = "#"+ iMonth.ToString() +"/"+
iDay.ToString() +"/"+ iYear.ToString() +"#";
sSqlString = "SELECT * FROM PersonMaster WHERE
DateOfJoiningCompany > "+ sAmericanDate +" ";