Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access v7.1
  HXTT Cobol v5.0
  HXTT DBF v7.1
  HXTT Excel v6.1
  HXTT Json v1.0
  HXTT Paradox v7.1
  HXTT PDF v2.0
  HXTT Text(CSV) v7.1
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Word v1.1
  HXTT XML v4.0
Offshore Outsourcing
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 Xing Tian Tai Lab of Xi'an City (abbr, HXTT)

HXTT Text(CSV)
Date detection not consistant
Robert McGlade
2008-02-11 08:16:24
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

Robert
Re:Date detection not consistant
HXTT Support
2008-02-13 16:08:03
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




Google
 

Email: webmaster@hxtt.com
Copyright © 2003-2019 Heng Xing Tian Tai Lab of Xi'an City. | All Rights Reserved. | Privacy | Legal | Refund | Sitemap