I'm looking for a Date object capable of storing down to microsecond granularity, does anyone know of one? The standard Date
object only stores down to milliseconds (I know that this is a platform limitation) and I could get around this by wrapping a Date
plus a fractional quantity in a custom class. However I was hoping to avoid having to write one with the appropriate calculations etc. I need to parse a boost::ptime
timestamp in Java and not loose the precision...
JSR-310 is in alpha stage, but may be useful to you anyway. (Unfortunately it's predecessor, Joda Time, only stores as far as milliseconds.)
java.sql.Timestamp
stores values down to nanoseconds, but doesn't help in terms of calculations. What calculations do you need to perform?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With