Rank: Member Groups: Member
Joined: 10/18/2010 Posts: 29
|
Hello
I have multiple date pickers in an asp.net gridview. I am having an issue at the moment where SQL server is throwing the following error:
The conversion of a nvarchar data type to a datetime data type resulted in an out-of-range value
I have googled this and I THINK its related to the fact that when the date pickers dont have a selected value, it is still passing 0001-01-01 through to the database (i can see this via Fiddler). this value is outside the range of the datetime type in sql server, therefore it throws an error
I have tried setting the EO.Web.DatePicker).SelectedDate = DateTime.MinValue, but it still attempts to pass 0001-01-01 through to the database
So my question is, what is the best way to deal with date pickers that do not have a selected date so that it does not attempt to pass a value outside the range of sql datetime?
thanks
Jason
|
Rank: Member Groups: Member
Joined: 10/18/2010 Posts: 29
|
Please disregard prev question, have found similar questions and answers on this forum. Will get back to you if none of those work
thanks
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Great. Thanks for the update.
|