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.