Users Pricing

forum

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

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

Anonymous User 2835 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.


2 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md