This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I've checked the SimpleDateFormat tutorial at Sun as well as the DateTime Tutorial. I am not seeing how one gets the time from the machine you are running on. I know it will be a "duh" as soon as someone points it out to me, but I'll have to live with that. I'm just not seeing it. Thanks.
To be more specific: Calendar cal = Calendar.getInstance(); int hour = cal.getField(Calendar.HOUR); int minute = cal.getField(Calendar.MINUTE); If you just want to have the time as a String: SimpleDateFormat timeMaker = new SimpleDateFormat("hh:mm:ss"); //note that the default contructor of "Date" uses the current date/time String time = timeMaker.format(new Date());