DataSet ds = new DataSet(); String strXML;SqlConnection con = new SqlConnection ("User ID=sa; Password=pwd; Initial Catalog=Pubs; Data Source=servername); SqlDataAdapter da = new SqlDataAdapter("SELECT emp_id, fname, lname, hire_date FROM Employee WHERE minit='M'", con); da.Fill(ds);strXML = ds.GetXml(); System.Xml.XmlDocument objDoc = new System.Xml.XmlDocument();System.Xml.XmlNodeList objNodeLst;objDoc.LoadXml(strXML);// LoadXml method is used to load the XML from the string into the XmlDocument.objNodeLst = objDoc.SelectNodes("//NewDataSet/Table/hire_date");foreach(System.Xml.XmlNode objNode in objNodeLst){ //DateTime value is formatted here as per your need. DateTime dt = DateTime.Parse(objNode.InnerText); objNode.InnerText = dt.ToShortDateString(); }strXML=objDoc.InnerXml;