I have a data table .I load it from sql .The table containing three columns .Now i want to make some change in the table.(ex)I want to change a column date time(mm/dd/yy)to dd/mm/yy format.
- private void chartload()
- {
- datatable dt=new datatable();
- //Table have some data.
- List<eDetails> elist = new List<licenseDetails>();
- elist = (from DataRow dr in dt.Rows
- select new licenseDetails()
- {
- Name = dr["Name"].ToString(),
- Obj= dr["obj"].ToString(),
- Time=Convert.ToDateTime(dr["Time"]).ToString("dd/mm/yy H:mm")
- }).ToList();
- //I affect the date format
- //I want to load my list to data table
-
- }
-
- public class eDetails
- {
- public string Name { get; set; }
- public string Inuse { get; set; }
- public string Time { get; set; }
- }
I want to load my list to data table .Suggest some ideas.