The 3 pieces of code tht influence this are the following:
Web.config file -- <globalization uiCulture="en-GB" culture="en-GB"/>
Default.aspx.cs --
protected void EventDetail_ItemUpdating(object sender, DetailsViewUpdateEventArgs e)
{
e.NewValues["eventstart"] = Convert.ToDateTime(e.NewValues["eventstart"], new CultureInfo("en-GB"));
e.NewValues["eventend"] = Convert.ToDateTime(e.NewValues["eventend"], new CultureInfo("en-GB"));
}
Default.aspx --
<asp:DetailsView ID="EventDetail" runat="server" DefaultMode="Edit" OnItemUpdated="EventDetail_ItemUpdated"
DataSourceID="SqlDataSourceDetail" DataKeyNames="id"
AutoGenerateEditButton="True" OnItemCommand="EventDetail_ItemCommand"
Width="50px" AutoGenerateInsertButton="True" AutoGenerateRows="False" OnItemInserted="EventDetail_ItemInserted"
CssClass="detail" GridLines="None" OnItemUpdating="EventDetail_ItemUpdating">
The error i get is when i try and book an event is -- arithmitic overflow error converting expression to data type datetime.