nanoseconds are lost during SampleDateFormat
Brought to you by:
tylertravis
When the following method is called:
com.framework.misc.Utility.formatTimestampToString
(aTimestamp, "yyyy-MM-dd kk:mm:ss.SSS")
SimpleDateFormat is used to format a the passed in
Timestamp. However during the format() method call
timestamp implicitly gets casted into java.util.Date and
as a result one gets '000' all the time for nanoseconds.
I have a work around. How do I contribute?
P.S. Do you guys need to create a new category called
misc or utilities?