string Expdate = ((Label)e.Row.FindControl("lblExpDate")).Text;
string date;
date = Convert.ToString(DateTime.Now.ToString("dd/MM/yyyy"));
if (DateTime.Compare(Convert.ToDateTime(Expdate),Convert.ToDateTime(date)) < 0)
{
((Label)e.Row.FindControl("lblStatus")).Text = "INActive";
}
else
{
((Label)e.Row.FindControl("lblStatus")).Text = "Active";
}
its not comparing can anyone tell me wht da problem with this code
Compare date with today's date
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Naeem KhanRank #2,072 · 698 reputationPosted Oct 5, 2009, 2:15 AM EDT
Deepak Bhatia142 reputationPosted Oct 5, 2009, 10:27 PM EDT