File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes displaying current time Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "displaying current time" Watch "displaying current time" New topic
Author

displaying current time

Jane Dunne
Greenhorn

Joined: Feb 14, 2005
Posts: 15
Hi,
I'm trying to display the time when a user logs out of my application. I'm using
System.out.println(System.currentTimeMillis());
but it keeps returning 1153135669261 every time. How can I capture the current time and display it in hours, minutes and seconds?

Thanks alot
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8708
    
    6

java.text.SimpleDateFormat


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Shaan Shar
Ranch Hand

Joined: Dec 27, 2005
Posts: 1249



Hope it helps


[ July 17, 2006: Message edited by: Ankur Sharma ]

The Best way to predict your future is to create it - Every great individual common man
Jane Dunne
Greenhorn

Joined: Feb 14, 2005
Posts: 15
new Date.toString() worked. Thanks alot!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: displaying current time
 
Similar Threads
SCWCD exam voucher
Current time
Specific TimeZone when displaying date on javascript.
Cannot Convert String to Int. Clock question.
Looping accoridng to time