You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by hitz <hd...@rediffmail.com> on 2011/06/18 19:10:31 UTC

date problem

Hi,
I am using apache.poi.hssf.usermodel.HSSF.when i try to read date from excel
file,it gives numeric value but when I set date after 13 onwards ie
13/6/2011 den it reads it but if i give before 13 ie 1 to 12 of any month it
gives number.

Can anyone help me out in this?

--
View this message in context: http://apache-poi.1045710.n5.nabble.com/date-problem-tp4501687p4501687.html
Sent from the POI - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org


Re: date problem

Posted by Nick Burch <ni...@alfresco.com>.
On Sat, 18 Jun 2011, hitz wrote:
> I am using apache.poi.hssf.usermodel.HSSF.when i try to read date from excel
> file, it gives numeric value

That's to be expected - excel stores dates as numbers (days since 1900 or 
1904). Use DateUtil to get the date, and DataFormatter to format it as a 
string in the same format as excel

Nick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org