This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Sorry if the details are blurry. I am required to insert date values into the my table and along with it is also a column timestamp.
In my excel both date and timestamp exists and are shown correctly on checking the cell. But when I read it into my Java app, I want the date cell from excel as 'yyyy-MM-dd' and timestamp cell as 'yyyy-MM-dd HH:mm:ss' . Now it is parsed in the Date form.
How I would differentiate between these two formats while using POI?
My use of the word 'datetime' in the above post might be the cause of confusion.
I think you are trying to make a distinction which does not exist. Consider this statement from the POI documentation for the Cell interface which I happened to stumble across while researching your post:
Note - There is actually no 'DATE' cell type in Excel. In many cases (when entering date values), Excel automatically adjusts the cell style to some date format, creating the illusion that the cell data type is now something besides CELL_TYPE_NUMERIC. POI does not attempt to replicate this behaviour.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: POI reads date format in excel as datetime