I want to insert datetime into the database.I want to insert date as a dd/MMMM/yyyy format
SqlDateTime x;
if((TextBox1.Text).Length==0)
{
x=SqlDateTime.Null;
}
else
{
x=DateTime.Parse(TextBox1.Text);
}
command=sqlConnection.CreateCommand();
command.CommandText="insert into Table2 values('"+x+"')";
sqlConnection.Open();
command.ExecuteNonQuery();
Response.Write("Save");
when I add this type of dates ex.25/02/2005 it occur error, how can I solve this.