BCP Connector fails to update a SMALLDATETIME field

Document created by mike_aronson Employee on Nov 15, 2013
Version 1Show Document
  • View in full screen mode

     The BCP connector fails to update a field of SMALLDATETIME data type. An error occurs similar to one of the following:

     java.text.ParseException: Unparseable date: "2013-06-05T15:51:26"
     at java.text.DateFormat.parse(Unknown Source) at com.boomi.connector.bcp.BcpUtil$DateConverter.convertTo(BcpUtil.java:543)

     This error is coming from the BCP utilitiy and may be an incompatibility issue with this data type. For example, the bcp utility reference for SQL Server 2005 at this link states that when data is bulk exported from SQL Server into a data file, the bcp utility does not generate date formats for SMALLDATETIME data:

http://msdn.microsoft.com/en-us/library/ms162802(v=sql.90).aspx

     The SQL Server 2012 Transact-SQL reference guide recommends using the time, date, datetime2 and datetimeoffset data types for new work instead of using the smalldatetime data type:

http://msdn.microsoft.com/en-us/library/ms182418.aspx

     If changing the field data type is not an option, another recommendation is to import this data using BCP into a temporary table that has character data type for this field and then convert the data to the end table with smalldatetime data type within the same database (not using BCP).

Attachments

    Outcomes