Good day ABDULLAHAAJSOFT
I assume that in the database you are using datetime data type for the column, but in the application you are using String type (String class). therefore when moving the data from the app to the database, the SQL Server Engine try to do implicit
convert (implicit convert is when you do not use explicate CONVERT or CAST function, and the server find that there is an option to convert the data).
Now the implicit convert did not work since the server found that the string is
out-of-range value for a date, and that might be related to the date format.
for example this implicit convert will work ok:
declare @D datetime = '2015-10-22'
but if you try to use a different format for the date like yyyy-dd-mm then the convert will fail, and you will get the same error as you did. The server tried to convert the number 22 to month but this is out-of-range value for month:
declare @D datetime = '2015-22-10'
What is the solution?
1. dont ever use implicate convert!
Convert the data to the right type before you try to insert it to the database (in the application level)
2. You should not use string in the app as well, but DateTime type for example.
3. If you ahve to convert from string to database datetime then make sure that you use format like yyyy-mm-dd or use the right convert hint as you can see in this link:
http://www.sqlusa.com/bestpractices/datetimeconversion/