Hi,
I have a Drop Down List that is being populated by a sql server database with the following query...
sqlSchedule = ("SELECT cast(DATE_FROM as smalldatetime) AS DATE from EVENTS WHERE ITEMID = '" + txtid + "'");
The DropDown is populated with '30/09/2007 12:00:00 AM'
Can someone please tell me how to change the date format in the dropdown to 30/09/2007.
SqlCommand = new SqlCommand(sqlSchedule);
SqlCommand.Connection = SqlConnection;
dataSeta = new DataSet();
SqlDataAdapter = new SqlDataAdapter();
SqlDataAdapter.SelectCommand = SqlCommand;
SqlDataAdapter.Fill(dataSeta, "TableA");
cboCourseDates.DataSource = dataSeta;
cboCourseDates.DataTextField = "DATE";
cboCourseDates.DataValueField = "DATE";
cboCourseDates.DataBind();
Thanks,
Natalie.