Error "The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value." is identified by the VB Application

The information in this document applies to:

- Great Plains on Microsoft SQL Server


The VB Application identified by the event source logged this Application WebService: Thread ID: 2560 ,Logged: MsgBox: , Run-time error '-2147217913 (80040e07)':

[Microsoft][ODBC SQL Server Driver][SQL Server]The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.


There is a problem with the ODBC DSN or using non-English (US) regional settings.


Check the ODBC DSN connection string.

1 Click
Start, point to
Programs, pointto
Administration Tools and then click
Data Sources (ODBC).

2. Locate the DSN that was used for the eService Calls and eReturns installation, click to selectthe DSN name and then click

3. On the first screen, accept the current entries by clicking
Next. On the second screen,enter the SQL login and password and then click
Next. On the third screen,make sure that the
Use ANSI quoted identifiers and
Use ANSI nulls, paddings and warning are both cleared and then click
Next. On the last screen,make sure all of the check boxes on this windows are also cleared and then click

After making these changes, re-boot the Internet Information Services (IIS) server so that the Dllhost.exe processes are cleared from memory.

Check the Regional Settings on the IIS server.

1. Click
Start, click
Settings, click
Control Paneland then click
Regional Options.

2. On the General tab, check the language settings to make sure Western Europe and United States is the only language and is defaulted.

3. On the Input Locals tab, make sure English is selected and defaulted.

If there are any changes,re-boot the machine for them to take effect.

This article was TechKnowledge Document ID:33467

TechKnowledge Content

Need more help?

Expand your skills
Explore Training
Get new features first
Join Microsoft Insiders

Was this information helpful?

Thank you for your feedback!

Thank you for your feedback! It sounds like it might be helpful to connect you to one of our Office support agents.