× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Fri, Jan 6, 2012 at 1:48 PM, Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx> wrote:
Try this link:

http://www.systeminetwork.com/article/pro/parsing-an-excel-spreadsheet-part-2-handling-dates-7219

That seems to require a subscription, possibly even a paid subscription.

I don't know HSSF at all, but I am fairly familiar with Excel, and I
can tell you its dates are just a number representing the days since
(and including, sort of) January 1, 1900 (unless using the 1904-based
dates, which is the default on Macs).

Jan 1, 1900 is day 1. Feb 28, 1900 is day 59. Excel thinks there was
a Feb 29, 1900, and assigns that to day 60. Mar 1, 1900 is day 61,
and from there you are good to go. Today (Jan 6, 2012) is day 40914.
Times are fractions of a day. So noon today would be 40914.5.

With this information, you can roll your own date routines if you need
to. But I have to imagine HSSF provides some convenience functions
for you already. (If you are not already heavily invested in an RPG
and/or Java solution, I encourage you to check out iSeries Python, and
the free (for any Python) xlrd and xlwt modules instead, which is what
I use.)

John

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.