TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Dinesh Santhalingam
NA
737
370.2k
Affect the data table
Jan 3 2017 8:28 AM
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.
Reply
Answers (
9
)
UPLOADFILE NOT REFERENCING THE POINTED FILE
Change date format