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.
subject: POI reads date format in excel as datetime