Feb 16, 2010

Converting dd-mm-yy format to dd/mm/yy system format in asp.net,c#.net

  string month = string.Empty;
        string year = string.Empty;
        string date = string.Empty;

string edate = txtend.Text;
            string[] words1 = sdate.Split('-');

            date = words1[0].ToString();
            month = words1[1].ToString();
            year = words1[2].ToString();

            string words = month + "/" + date + "/" + year;
  string words3 = month1 + "/" + date1 + "/" + year1;

            DateTime dt1 = Convert.ToDateTime(words);

No comments:

Post a Comment