This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 8839
    
    7

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
Looping accoridng to time
Specific TimeZone when displaying date on javascript.
Current time
SCWCD exam voucher
Cannot Convert String to Int. Clock question.