Feedback
Did this article resolve your question/issue?

   

Article

Connect for ODBC Text Driver 7.1 is converting two digit year "20" to 1920 instead of 2020

Information

 
TitleConnect for ODBC Text Driver 7.1 is converting two digit year "20" to 1920 instead of 2020
URL Nameconnect-for-odbc-text-driver-issues-with-converting-two-digit-year-20-to-1920-instead-of-2020
Article Number000171759
EnvironmentProduct: Connect for ODBC Text Driver
Version: 7.10.4.40
OS: Windows 10
Database: N/A
Application: All supported applications
Question/Problem Description
Connect for ODBC Text Driver is converting two digit year "20" to 1920 instead of 2020.
Steps to ReproduceCreate a source file that has dates in mm/dd/yy format. Define the mask on the field as mm/dd/yy.

Sample CSV data

"val1","01/03/20"
"val2","12/23/19"

Using ODBC test tool, connect to the CSV file.
Then do a SELECT statement: select * from text_table

The output was the following:
Get Data All:
"FIELD_1", "FIELD_2"
"val1", 1920-01-03
"val2", 2019-12-23
2 rows fetched from 2 columns.
Clarifying Information
Error Message
Defect Number
Enhancement Number
Cause
The connection parameter “CenturyBoundary” was set to the default value, which is 20.
That means any year less than 20 for example 12,18 etc will be returned as 2012, 2018 and any year 20 and above will be returned in 1900’s.
Resolution
Set the connection parameter "CenturyBoundary" to a higher value than the default value of 20.
This is described in the product documentation page: 
http://media.datadirect.com/download/docs/odbc/allodbc/index.html#page/odbc%2Fcentury-boundary.html%23
Workaround
Notes
Last Modified Date2/5/2020 12:04 AM
Files
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.