DateTime date = DateTime.Now;
string str="";
date =Convert.ToDateTime(dtl.Rows[0]["createddate"].ToString());
str = date.ToString("mm/dd/yyyy");
DateTime datenow = DateTime.Now;
string strnow="";
strnow = datenow.ToString("mm/dd/yyyy");
if (str != strnow)
{
}
//this gives me wrong month for both string variable why? and what is solution for that?