The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value

Problem:

When attempting to operate the eNICQ 5 application, the following unhandled exception occurs:

"The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value"

Solution:

In our experience supporting the eNICQ 5 application, this problem has two possible explanations:

1) Regionalization Conflict.  This explanation is most commonly found for installations outside of the US.  This problem is caused by a mismatch in the datetime formats between the Windows operating system and the SQL Server. For example, one may be set to format datetime values in a US regional setting while the other is set to a different regional setting. To correct the problem, a single regional format should be used for both Windows and SQL Server.

2) Collation Conflict.  This explanation is most commonly found for installations inside the US.  This problem is caused by a mismatch in collation between the database and the server.  Databases created in eNICQ versions prior to 5.3.0 were established with a fixed collation setting of SQL_Latin1_General_CP1_CI_AS.  To avoid potential collation conflicts between database and server, the practice of setting collation on database creation has been discontinued in more recent releases.  Please contact Vermont Oxford technical support for assistance if you suspect your problem is due to a collation conflict.

Have more questions? Submit a request

Comments