string dt="16/01/2014"; string dt0="12/31/2013"; if(dt != dt0) { }
string dt = "16/01/2014"; string dt0 = "12/31/2013"; DateTime dt_date0 = DateTime.ParseExact(dt, "dd/MM/yyyy", null); DateTime dt_date1 = DateTime.ParseExact(dt0, "dd/MM/yyyy", null); if (dt_date0 != dt_date1) {
DateTime dt = new DateTime(); dt = DateTime.ParseExact("your date here", "MM/dd/yyyy", null); //converting string into standard datetime format
DateTime datet ,date0; string dt = "16/01/2014"; // dd/MM/yyyy. string dt0 = "12/31/2013"; // MM/dd/yyyy string[] splitdate=new string[3]; splitdate = dt.Split('/'); dt = splitdate[1].ToString() + "/" + splitdate[0].ToString() + "/" +splitdate[2].ToString(); datet = Convert.ToDateTime(dt); date0 = Convert.ToDateTime(dt0); if (datet != date0) { }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)