DateTime dt;
DateTimeFormatInfo dtFormat = new System.Globalization.DateTimeFormatInfo();
dtFormat.ShortDatePattern="yy-MM-dd" ;
dt=Convert.ToDateTime("04-05-06",dtFormat);
Response.Write(dt.ToString("yyyy-MM-dd"));
dtFormat.ShortDatePattern="MM-dd-yy" ;
dt=Convert.ToDateTime("04-05-06",dtFormat);
Response.Write(dt.ToString("yyyy-MM-dd"));
dtFormat.ShortDatePattern="dd-MM-yy" ;
dt=Convert.ToDateTime("04-05-06",dtFormat);
Response.Write(dt.ToString("yyyy-MM-dd"));