G
Guest
I have a datetime field in table.
I want to insert the current time of database server to the table thr
ASP.NET (C#).
I have dataset to do the insert:
DataSet1.TableNameRow rowNew =
(DataSet1.TableNameRow)DataSet1.TableName.NewRow();
rowNew.DateTimeField = System.DateTime.Now;
(rest of the code..)
I would like to ask in the second line of the code, I can insert the current
time of the web server to the DateTimeField,
However if I want the time refer to the current time of the SQL server, i.e
the GETDATE() of MS SQL , what should I write?
I can't type
rowNew.DateTimeField = "GETDATE()";
Thanks for any help.
I want to insert the current time of database server to the table thr
ASP.NET (C#).
I have dataset to do the insert:
DataSet1.TableNameRow rowNew =
(DataSet1.TableNameRow)DataSet1.TableName.NewRow();
rowNew.DateTimeField = System.DateTime.Now;
(rest of the code..)
I would like to ask in the second line of the code, I can insert the current
time of the web server to the DateTimeField,
However if I want the time refer to the current time of the SQL server, i.e
the GETDATE() of MS SQL , what should I write?
I can't type
rowNew.DateTimeField = "GETDATE()";
Thanks for any help.