Hi friends !
First of all i want to convert system's datetime in string then i want to insert this date in a table.
plz can anybody help me?
Thanks....
How to convert datetime in string
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Scott LysleRank #49 · 31K reputationPosted Jan 28, 2007, 4:07 PM EST
Now.ToShortDate();
or
Now.ToLongDate();
You can use a custom format as well (e.g.):
DateTime d = new DateTime(1944, 06, 04);
string dday;
dday = String.Format("{0:MMM dd, yyyy}", d);
mouadh trabelsi4 reputationPosted Feb 2, 2007, 12:32 AM EST
string
sDate = DateTime.Now.ToString();string requete = "Insert into table_name (date_field) values (CONVERT(DATETIME,'"+sDate+"', 103))";