public static DataTable fetchdatesmaternity(int userid) { bus_eleave_ugc1 bus = new bus_eleave_ugc1(); bus.userid = userid; DataTable dt = bus.fetch_holidaysma(); DataTable dtma = new DataTable(); dtma.Columns.Add("dates1"); for (int i = 0; i < dt.Rows.Count; i++) { string[] split = dt.Rows[i]["dates"].ToString().Split(','); for (int j = 0; j < split.Length; j++) { DataRow dr = dtma.NewRow(); dr["dates1"] = split[j]; dtma.Rows.Add(dr); } } return(dtma); }