Main   Products   Offshore Outsourcing   Customers   Partners   ContactUs  
JDBC Databases
  HXTT Access 7.0.033
  HXTT Cobol 4.0.033
  HXTT DBF 7.0.033
  HXTT Excel 6.0.034
 
  Buy Now
  Support
  Download
  Document
  FAQ
  HXTT Paradox 7.0.033
  HXTT PDF 1.1.033
  HXTT Text(CSV) 7.0.033
  HXTT Word 1.0.031
  HXTT XML 3.0.033
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 Excel
Parsing Wrong date when uploading 2010 Excel
S.P.L Srikanth
2013-01-02 07:30:49.0
Hi,
We recently have purchased Excel_Core_JDBC20.jar, HXTT_Common_JDBC20.jar In order to upload 2010 Excel file in JDK 1.2. I can able to load excel successfully, But When I am trying to parse date from Excel, I am getting "Date+1 day" as value.
Example:
I am trying to upload the below record (The file should have xlsx as extension "sample.xlsx")
AccountNumber IssueDate CheckNumber Amount
0000000017 11/29/2012 300051 257200

JDBC URL = jdbc:excel:///_memory_/?versionNumber=XLSX
DRIVER CLASS = com.hxtt.sql.excel.ExcelDriver
Properties properties=new Properties();
properties.setProperty("tmpdir","_memory_");
properties.setProperty("delayedClose","-1");
properties.setProperty("firstRowHasNames","false");

I am creating database using the above code and querying to get the Excel records using below code.

sql = "Select * from "+databaseName+"."+tableName;
stmt=con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
rs = stmt.executeQuery(sql);

When I use rs.getString(j+1), I am getting some number. And when I use rs.getDate(j+1), I am getting 11/30/2012 (+1 day to the uploaded date).

Note: The date is working fine when I use same data in xls file, I am getting this issue when I upload an 2010 Excel formats(xlsx files).
Please suggest.


Re:Parsing Wrong date when uploading 2010 Excel
HXTT Support
2013-01-02 17:06:12.0
Failed to recur your issue. If possible, you can send your sample.xlsx . BTW, please download the latest JDBC 2.0 version, which maybe your issue have disappeared. The ltaest feature is listed at here
Re:Re:Parsing Wrong date when uploading 2010 Excel
S.P.L Srikanth
2013-01-03 08:09:06.0
Here is the data, You can copy paste in an xlsx file and try to upload it.
AccountNumber IssueDate CheckNumber Amount
0000000017 11/29/2012 300051 257200
Re:Re:Parsing Wrong date when uploading 2010 Excel
S.P.L Srikanth
2013-01-03 08:09:29.0
and BTW, I have downloaded the latest jar files in November
Re:Re:Re:Re:Parsing Wrong date when uploading 2010 Excel
HXTT Support
2013-01-03 16:08:53.0
>Here is the data, You can copy paste in an xlsx file and try to upload it.
But in my test, 11/29/2012 will become a varchar. If I use a date format, it show normal. So I need you to send your XLSX sample.
Re:Re:Re:Re:Re:Parsing Wrong date when uploading 2010 Excel
S.P.L Srikanth
2013-01-03 16:31:42.0
ok, Please provide your email id, so that I will send my code and xlsx file to you
Re:Re:Re:Re:Re:Re:Parsing Wrong date when uploading 2010 Excel
HXTT Support
2013-01-03 16:39:37.0
You can try support at hxtt.com

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