Working with Date and Time in Java
Posted by Administrator in Uncategorized, tags: java/eclipseJODA is a very good API for working with DateTime paradigms in a much more comfortable way than the basic JDK functions do. See on Userfriendly for a good summary what JODA has to offer.
One good thing about JODA is its well organized Date and Time structures. For example from a Object with Time 19:33 you can getMinutes() == 33 or toStandardMinutes.getMinutes() == 19* 60 + 33 without having the conversion work. This works for all Years, Weeks, Month, Hours, Days, Minutes, Seconds, Milliseconds even the exceptions like differing february days every 4 years.
Formating Java Util Date (and TIme)
java.text.SimpleDateFormat dateFormatter = new java.text.SimpleDateFormat("HHmmssSSS");
String theFormattedTime = dateFormatter.format(new java.util.Date());
Entries (RSS)