FIX: "The syntax of the string representation of a datetime value is incorrect" error when you use SQL Server 2008 R2 PowerPivot for Excel 2010

Article translations Article translations
Article ID: 2729495 - View products that this article applies to.
Microsoft distributes Microsoft SQL Server 2008 R2 Service Pack 1 fixes as one downloadable file. Because the fixes are cumulative, each new release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 R2 Service Pack 1 fix release.
Expand all | Collapse all

On This Page

Symptoms

Consider the following scenario:
  • You import data from an IBM DB2 database by using the Table Import Wizard in Microsoft SQL Server 2008 R2 PowerPivot for Microsoft Excel 2010.
  • You select the Select from a list of tables and views to choose the data to import option.
  • You select a table that you want to import, and then you click Preview & Filter.
  • You select a value of a date type column, and then you click OK in the new dialog box.
In this scenario, you receive the following error message:
The syntax of the string representation of a datetime value is incorrect. SQLSTATE: 22007, SQLCODE: -180

Cause

The issue occurs because the date format in the SQL query that is generated to read data from the DB2 database is not the format that DB2 requires.

Resolution

Cumulative update information

SQL Server 2008 R2 Service Pack 2

The fix for this issue was first released in Cumulative Update 3. For more information about how to obtain this cumulative update package for SQL Server 2008 R2 Service Pack 2, click the following article number to view the article in the Microsoft Knowledge Base:
2754552 Cumulative update package 3 for SQL Server 2008 R2 Service Pack 2
Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 R2 Service Pack 2 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
2730301 The SQL Server 2008 R2 builds that were released after SQL Server 2008 R2 Service Pack 2 was released

SQL Server 2008 R2 Service Pack 1

The fix for this issue was first released in Cumulative Update 8. For more information about how to obtain this cumulative update package for SQL Server 2008 R2 Service Pack 1, click the following article number to view the article in the Microsoft Knowledge Base:
2723743 Cumulative update package 8 for SQL Server 2008 R2 Service Pack 1
Note Because the builds are cumulative, each new fix release contains all the hotfixes and all the security fixes that were included with the previous SQL Server 2008 R2 Service Pack 1 fix release. We recommend that you consider applying the most recent fix release that contains this hotfix. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
2567616 The SQL Server 2008 R2 builds that were released after SQL Server 2008 R2 Service Pack 1 was released

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, about the performance or reliability of these products.

Properties

Article ID: 2729495 - Last Review: October 15, 2012 - Revision: 4.0
Applies to
  • Microsoft SQL Server 2008 R2 PowerPivot for Microsoft Excel 2010
Keywords: 
kbqfe kbfix kbexpertiseadvanced KB2729495

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com