I have a long with the EPOCH time. I want to do some math and go to a hhmmssSSS number. Any math/date wizards out there who could help me? Thanks!
Asked
Active
Viewed 93 times
1
-
Not duplicated !!!!!!!! Using math, not a formatter! – TraderJenny Oct 06 '14 at 01:29
-
See the duplicate of that duplicate. – Sotirios Delimanolis Oct 06 '14 at 01:31
-
You use math the same way you would turn a number into a String. Using a combination of `%` and `/` The difference is that sometime you use `10` and sometime you use `6` depending on whether the digit has 10 or 6 possible values. BTW If you don't want GMT, you will need to adjust for the time zone. – Peter Lawrey Oct 08 '14 at 22:35
-
See here for an example https://github.com/OpenHFT/Java-Lang/blob/master/lang/src/main/java/net/openhft/lang/io/AbstractBytes.java#L1218 – Peter Lawrey Oct 08 '14 at 22:36