Show me how you're creating that date.

On 11/25/03 11:08 AM, "Sasha Borodin" <[EMAIL PROTECTED]> wrote:

> Howdy,
> 
> First let me say what a cool product POI is...I've only been using it a
> couple of hours, with some some amazing(ly easy) results!
> 
> I've run into a slight snag, and searching the archives has not yielded an
> answer yet. The problem I'm having is that the dates displayed in Excel are:
>   - 1 calendar day ahead
>   - and 4 years ahead
> 
> Ahead of what i'm expecting, that is ;-)  I use this code snippet to insert
> Date values into cells:
> 
> HSSFRow header = sheet.getRow((short) 0);
> header.createCell((short) 0).setCellValue(aDate);
> 
> Of course I also create a date style, and set the cell style to that.
> 
> So for example, this is some debugging (toString) for 3 dates:
> 
> Sat Nov 01 00:00:00 CST 2003
> Sat Nov 15 00:00:00 CST 2003
> Sun Nov 16 00:00:00 CST 2003
> 
> And here is what shows up in Excel (in both the cell and formula bar):
> 
> 11/2/07
> 11/16/07
> 11/17/07
> 
> I have a feeling it has something to do with interpreting the zero's for
> time (which day does midnight belong to...), but I have no clue what the
> problem could be for the year offset.
> 
> Any input would be greatly appreciated.  Thank you!
> 
> -Sasha Borodin
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
Andrew C. Oliver
http://www.superlinksoftware.com/poi.jsp
Custom enhancements and Commercial Implementation for Jakarta POI

http://jakarta.apache.org/poi
For Java and Excel, Got POI?

The views expressed in this email are those of the author and are almost
definitely not shared by the Apache Software Foundation, its board or its
general membership.  In fact they probably most definitively disagree with
everything espoused in the above email.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to