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.
Hi all, Is there any way to get the systems time through a java program ? I tried using the getProperties option but it just gives informations related to Zone ... I need to get the Systems time during which a program of mine is running ... thanks kavya
Hi Kayva, You can get the current system time using <code>java.util.Date();</code> Hope that helps. ------------------ Jane Griscti Sun Certified Java 2 Programmer "When ideas fail, words come in very handy" -- Goethe
I think it's best to use System class for this and get the time from the System. Using System.currentTimeMillis()
Val SCJP <BR>going for SCJD
Joined: Oct 25, 2000
Jane , val Thanks alot for your responces ... I'd already tried both of these options ... I need to get the timing info in the actual format ( not just milliseconds) ... I tried the toString method but it does not seem to work ... is there any particular method which prints the time/date in the actual format ??? thanks kavya