If you are looking for a second page in fractions (milliseconds), this example will be useful.
public class DateFormatter {
public static void main(String[] args) {
Date date = Calendar.getInstance().getTime();
DateFormat formatter = new SimpleDateFormat("EEEE, dd MMMM yyyy, hh:mm:ss.SSS a");
String today = formatter.format(date);
System.out.println("Today : " + today);
}
}
Conclusion: Today: Tuesday, May 24, 2011, 07:23: 30.627 pm
You see that the SSS in the formatter returns fractions of a second for you.
source
share