forum

Home / DeveloperSection / Forums / How to add date in dd/MM/yyyy to mysql in asp.net?

How to add date in dd/MM/yyyy to mysql in asp.net?

Anonymous User 2288 11-Dec-2014

I've used an ajax calendarExtender tool and set Format to dd/MM/yyyy while inserting the date 21/12/2013 to mysql its giving error 

MySqlConnection conn = new MySqlConnection(cnnstring); 
string cmdText = "INSERT INTO trydate(Dob) VALUES ('" + TextBox1.Text + "')"; 
MySqlCommand cmd = new MySqlCommand(cmdText, conn);
conn.Open();
int a = cmd.ExecuteNonQuery();
Label1.Text = "Data Saved";
TextBox1.Text = "";

please help me to overcome from this.


Updated on 11-Dec-2014
I am a content writter !

Can you answer this question?


Answer

2 Answers

Liked By