Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Willie Howell   on Oct 19 In Asp.net Category.

  
Question Answered By: Charlie Evans   on Oct 19

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 +" ";

Share: 

 

This Question has 7 more answer(s). View Complete Question Thread

 


Tagged: