Page 1 of 1
Epoch Date
Posted: Thu Nov 15, 2001 2:44 am
by Michael
Is there any way that I can obtain the Epoch date in seconds for the date required using the JCommon ?? If there is mind letting me know because I tried many ways and I can only get a 13 digits long value and what I wanted is a 10 digit long value. Please advice.
RE: Epoch Date
Posted: Thu Nov 15, 2001 10:43 am
by David Gilbert
Hi Michael,
The SerialDate and SpreadsheetDate classes are designed to work with whole days only. I needed a date class that works in a similar way to dates in Excel, so that's why I wrote it.
The earlier versions of JCommon used BigDate from Canadian Mind Products (US$10 registration fee) - it's a great piece of code, but it's inconvenient to require users of JCommon to register BigDate so I'm not including it with JCommon any more.
SerialDate is supposed to implement a toDate() method to convert to java.util.Date - I haven't thought much about how to handle time zones and the fact that java.util.Date has lots more precision than SerialDate so you probably shouldn't rely on the conversion just yet.
Regards,
DG.