简体   繁体   中英

why date format is getting changed while reading using Apache poi?

I am reading excel data using Apache poi As follows

while (rowIterator.hasNext()) {   

                Row row = rowIterator.next(); 
                String date_time=row.getCell(0).toString();
                System.ou.println(date_time);
                           }

when i read 13/01/2017 10:11:18 out put is 13/01/2017 10:11:18 this its okay but when i try to read 12/1/2017 21:17 out put is coming wrong as 01-Dec-2017 instead of 12/1/2017 21:17 how to solve this?

也许[12/1/2017 21:17]与excel中的[01-Dec-2017]具有不同的单元格格式,但看起来像[12/1/2017 21:17]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM