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 am trying to save a xml file. I want to retrieve the system date and name the file as systemdate stamp like mmddyyhrminutes(in this format). Do you know how to retrieve system date and format it in that way
You can get the current date/time by simply creating a java.util.Date instance with the default constructor. If you need to use a java.sql.Date for whatever reason, you need to initialize it as new java.sql.Date( System.currentTimeMillis() ). You can format the date as you like using a java.text.DateFormat instance. hth, bear