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
Sonali Avhad
NA
234
42.8k
how to add current date and time to datacolumn of datatable in asp.net
Sep 30 2020 2:53 AM
I want to save current date and time . i am adding it into datacolumn.but it giving error for IMPORT_DATE_TIME.
My Code in cs file is as follow
DataTable dt =
new
DataTable();
dt.Columns.AddRange(
new
DataColumn[3] {
new
DataColumn(
"SRNO"
,
typeof
(Int32)),
new
DataColumn(
"BANKID"
,
typeof
(Int32)),
new
DataColumn(
"IMPORT_DATE_TIME"
,
typeof
(DateTime),System.DateTime.Now.ToString(
"MM/dd/yyyy HH:mm:ss tt"
))
});
It gives error Syntax error: Missing operand after '13' operator.
Reply
Answers (
4
)
Ibibo Cars Database Design
Get Record From Two table .