form code:
<asp:FormView ID="FormViewClient" runat="server" DataKeyNames="client_id" DataSourceID="ClientsObjectDataSource" OnItemUpdating="client_updating">
protected void client_updating(object sender, FormViewUpdateEventArgs e)
{
//FormViewClient.FindControl("");
TextBox tb = (TextBox) FormViewClient.FindControl("date_registeredTextBox");
string text = tb.Text;
System.Globalization.DateTimeFormatInfo dateInfo = new System.Globalization.DateTimeFormatInfo();
dateInfo.ShortDatePattern = "dd/MM/yyyy";
DateTime dt = Convert.ToDateTime( text,dateInfo);
string test = dt.Date.ToString();
e.NewValues["date_registered"] = dt.Date.ToString();
TextBox tb_start = (TextBox)FormViewClient.FindControl("licenced_startTextBox");
string text_start = tb_start.Text;
DateTime dt_start = Convert.ToDateTime(text_start, dateInfo);
e.NewValues["licenced_start"] = dt_start.Date.ToString();
TextBox tb_expired = (TextBox)FormViewClient.FindControl("licenced_expiredTextBox");
string text_expired = tb_expired.Text;
DateTime dt_expired = Convert.ToDateTime(text_expired, dateInfo);
e.NewValues["licenced_expired"] = dt_expired.Date.ToString();
// // dateInfo.ShortDatePattern = "yyyy/MM/dd";
// DateTime dt2 = Convert.ToDateTime(tb.Text,dateInfo);
double test = dt2.ToOADate();
// String test2 = dt2.Date.ToString();
// string convert = dt2.ToString();
//tb.Text = dt2.ToString();
// string test = "5/31/2011 12:00:00 AM";
// FormViewClient.DataBind();
// tb.Text = "";
//string query = "Update Clients set date_registered=convert(datetime,'"+text+"',103)";
//CreateConn objcon = new CreateConn();
// objcon.SQLConnDataTable(query);
}