Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.
Posted
Comments
Zoltán Zörgő 18-Jan-13 0:42am    
The error itself is obvious. But the solution depend on many things, especially on the statement resulting in the error and the data passed to it. So please give us more details if you want our help...
URVISH_SUTHAR1 18-Jan-13 0:50am    
Please provide more detail

Try This
1.Make sure your machine clock is not in 15th century ;-)<br />
    2.Recreate your model.<br />
    3It your table has default value you don't have to set it in code.<br />
    4.Consider using GETUTCDATE() instead of GETDATE()<br />
    5.Make sure there are no other DateTime fields without default values
.

http://stackoverflow.com/questions/9415509/sqldatetime-overflow-must-be-between-1-1-1753-120000-am-and-12-31-9999-1159[^]
 
Share this answer
 
v2
obj.StartDate = Convert.ToDateTime(DateTime.Now.ToString());

keeping like this i have resolved the error.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900