Al Koch
2005-06-25 20:37:47 UTC
How do I display the current time *including milliseconds*?
Hello,
I need to display the current time including milliseconds. The following
code:
DateFormat dfDateTimeStartupThread =
DateFormat.getDateTimeInstance(DateFormat.FULL,DateFormat.FULL,Locale.getDef
ault());
String sDateTimeStartupThread = dfDateTimeStartupThread.format(new Date());
System.out.println(sDateTimeStartupThread);
results in output like:
June 25, 2005 1:23:18 PM EST
which is nicely formatteed but I cannot find any way to get the milliseconds
to display.
How can this be done?
Thanks,
Al Koch,
***@MyRealBoxREMOVEALLTHESECHARS.com
Hello,
I need to display the current time including milliseconds. The following
code:
DateFormat dfDateTimeStartupThread =
DateFormat.getDateTimeInstance(DateFormat.FULL,DateFormat.FULL,Locale.getDef
ault());
String sDateTimeStartupThread = dfDateTimeStartupThread.format(new Date());
System.out.println(sDateTimeStartupThread);
results in output like:
June 25, 2005 1:23:18 PM EST
which is nicely formatteed but I cannot find any way to get the milliseconds
to display.
How can this be done?
Thanks,
Al Koch,
***@MyRealBoxREMOVEALLTHESECHARS.com