Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v5.2
  HXTT Cobol v2.1
  HXTT DBF v5.2
  HXTT Excel v4.2
  HXTT Paradox v5.2
  HXTT Text(CSV) v5.2
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT XML v1.2
Offshore Outsourcing
Oracle Data Import/Export
DB2 Data Import/Export
Sybase Data Import/Export
Free Resources
  Firewall Tunneling
  Search Indexing Robot
  Conditional Compilation
  Password Recovery for MS Access
  Password Recovery for Corel Paradox
  Checksum Tool for MD5
  Character Set Converter
  Pyramid - Poker of ZYH
   
   
   
Hongxin Technology & Trade Ltd. of Xiangtan City (abbr, HXTT)

HXTT Text(CSV)
Unexpected results when not using parameter dateFormat
Remco Schoen
2009-11-02 04:13:09.0
Hello,

When I don't use the parameter dateFormat, I get some strange results for columns that aren't in the default format yyyy-MM-dd.

I have this text-file:
id;ddmmyyyyFormat;mmddyyyyFormat;yyyymmddFormat
10;10-01-1900;01-10-1900;1900-01-10

And this url:
jdbc:csv:/.?delayedClose=0;_CSV_Separator=\\x3b;_CSV_Quoter=\";_CSV_Header=true

Both the second and third column are being returned as dates, although they don't fit the format.

But even worse, is that the value 10-01-1900 (Januray 10th) is wrongly translated. It is the Dutch (Italian) format dd-MM-yyyy, but the the result is Octobre 1st.

Kind regards,

Remco Schoen
Re:Unexpected results when not using parameter dateFormat
HXTT Support
2009-11-04 12:20:27.0
If you set dateFormat=yyyy-MM-dd as connection property, the latest package won't think 10-01-1900 or 01-10-1900 as date any more. Without that connection property, it will think it's date format.
Re:Re:Unexpected results when not using parameter dateFormat
Remco Schoen
2009-11-06 04:17:26.0
So, if I understand correctly, the parameter dateFormat controls two functions?

The first being if used, it checks if the string is in the right format and the second which format is specified.

I find that really confusing, because the driver will return false dates, if you forget the parameter.

According to your documentation (http://www.hxtt.com/text/installation.html#url) the default for this parameter is yyyy-MM-dd. I would expect that when the parameter isn't supplied, that this format is being used AND that the strings as well are checked if they are in this format.
Re:Re:Re:Unexpected results when not using parameter dateFormat
HXTT Support
2009-11-10 05:32:24.0
>According to your documentation (http://www.hxtt.com/text/installation.html#url)
>the default for this parameter is yyyy-MM-dd. I would expect that when the
>parameter isn't supplied
The latest package will work like your suggestion.
Re:Re:Re:Re:Unexpected results when not using parameter dateFormat
Remco Schoen
2009-11-11 06:46:09.0
Yup, this works now as expected. Thanks.

Search Key   Search by Last 50 Questions




Google
 

Address: 9 Station Rd., Xiangtan City, Hunan Province, P.R. China
Postcode: 411100
Phone: (86)731-58225727
Fax: (86)731-58225727
Email: webmaster@hxtt.com
Copyright © 1999-2011 Hongxin Technology & Trade Ltd. | All Rights Reserved. | Privacy | Legal | Sitemap