[Squirrel-sql-develop] dealing with bug ID: 2879711 Excel Date Export <1900-03-01
A Java SQL client for any JDBC compliant database
Brought to you by:
colbell,
gerdwagner
From: Miron S. <mir...@gm...> - 2009-11-04 14:38:15
|
Hi, I was wondering if solution for bug http://sourceforge.net/tracker/?func=detail&aid=2879711&group_id=28383&atid=393414 can be implemented by modifying file net.sourceforge.squirrel_sql.fw.gui.action.TableExportCvsCommand.java and putting at line 345 following code: long utcTime = time+offset; /* Work around Excel's problem with dates before 1900-03-01 * http://support.microsoft.com/kb/214058 * -2203891200000l is 1900-03-01 UTC time * 8640000 means 24 hours */ if (utcTime<-2203891200000l) { utcTime+=86400000; } java.util.Date xlsUTCDate = new java.util.Date(utcTime); I have also a second question. I can't find any option for exporting tables as OpenOffice Calc or XML files. Is there currently any way to do it? If not, it seems I would be nice to have this functionality, and implementing it would be possible by further modifying files TableExportCvsCommand and TableExportCvsController. There would also be some additional libraries required for OpenOffice's export. Miron |