I am having an application in .NET 3.5 and SQL Server 2005.
There are lot of instances in my application where user is asked for date. There I found an error that whenever a user enters a date less than 01/01/1753 it gives the following error:
SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and
12/31/9999 11:59:59 PM.
When, I drill down the error, I found that .NET supports dates from 01/01/0001 to 12/31/9999 whereas SQL Server 2005 supports date range of 01/01/1753 to 12/31/9999.
Now I need to have check in my application for min date.
But the problem is that I have to implement it at lot of instances, so finding some better solution.
Can anyone tell me the other way round to handle this date issue.
Thanks in Advance
Perhaps this might help you to get a valid SQL DateTime easy
Usage