yeah, possibly ... makes sense. thanks. Quoting "Hart, Justin" <[EMAIL PROTECTED]>:
> The one day is a bit simpler than that. You said that the month started on > day 1, according to the date format, it probably (though I certainly don't > know as much about the implementation as many on this list do) started at 0. > If you are using java.util.Calendar, then it should have started at 0. So > Jan 0, 2003 in Calendar would be Jan 1 2003 in english. > > Justin > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 25, 2003 7:28 PM > To: POI Users List > Subject: Re: AW: setCellValue(Date) is displayed ahead by 1 day and 4 > years > > > The 1 day issue is probably combination of a rounding error plus timezone > plus > midnight (00:00) time... could be in POI, could be in your code.. needs > investigation.... > > The four years issue is the difference between files created on a Mac vs > files > created on a PC. While one uses a 1904 date baseline, the other uses 1900 > (or > vice versa.... since its near midnight in my timezone, i shall not tax my > brain > to remember which is which) ... > > There is low level record (the "1904" record) that tells you which format > the > data is stored in the file. I dont know if/how POI handles this at a higher > level... probably getDateValue should account for this..... > > Quoting Sasha Borodin <[EMAIL PROTECTED]>: > > > CST is Central Standard Time (a U.S. Time zone) - but that's just what > > Date.toString() outputs in my locale...it's still just a java.util.Date > > that's being passed to Cell.setCellValue(). > > > > Thanks for your reply. > > > > -Sasha > > > > On 11/25/03 10:36 AM, "Mehner, Bj�rn" <[EMAIL PROTECTED]> wrote: > > > > >> 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 > > > > > > What on earth is CST? Maybe you are using a timezone Excel cannot deal > > > with? > > > > > > ciao Bodo > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
