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
|
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.
|