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
  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
Heng Xin Tian Tai Ltd. of Beijing City (abbr, HXTT)

Date detection not consistant
Robert McGlade
2008-02-11 08:16:24.0
Hello, your driver does date detection for odbc based schema where the standard def is not known i.e (in the scema.ini)
C1 Date could be many formats

so I have a situation like this:

13/03/2005 will be detected as dd/MM/yyyy (13th of March 2005)
06/02/2005 will be detected as MM/dd/yyyy (should 6th of February 2005 but is coming back as 2nd of June 2005)

both should be dd/MM/yyyy

is there a way we can tell the driver what the format of a date column should be? maybe something on the url connection string

many thanks

Re:Date detection not consistant
HXTT Support
2008-02-13 16:08:03.0
v4.0.016 provides dateFormate, timeFormat and timestampFormat connection property to specify the default parse sequence of date, time, and timestamp formats. For instance, jdbc:csv://///textfiles?_CSV_Separator=\t;csvfileExtension=TXT;dateFormat=dd/MM/yyyy . That latest package will be released after about 48 hours.

BTW, the old DATE [(dateFormat)] | TIME [(dateFormat)] | TIMESTAMP [(dateFormat)] in CREATE TABLE sql can still be used to assign a different parse mode for a specific. For instance, you have a abc.efg file which contains some data line like "name2 city2 20030806|115441|2003/08/06 115441.324\r\n", you can use "CREATE TABLE if not exists 'abc.efg' (name varchar(25), city varchar(20),logindate date ('yyyyMMdd|'),logintime time ('hhmmss|'),logintimestamp timestamp ('yyyy/MM/dd hhmmss.SSS'),_StuffedColumn char(2) default '\r\n');". You should see java.text.SimpleDateFormat in Java API document to know more details about date-time formatting.

Search Key   Search by Last 50 Questions


Copyright © 1999-2017 Heng Xin Tian Tai Ltd. of Beijing City. | All Rights Reserved. | Privacy | Legal | Sitemap