This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Convert milliseconds to seconds Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Convert milliseconds to seconds" Watch "Convert milliseconds to seconds" New topic
Author

Convert milliseconds to seconds

Chris Ramsey
Ranch Hand

Joined: Sep 15, 2003
Posts: 34
Does anyone have a method that will convert milliseconds into seconds?
Thanks.
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

I usually multiply by 1000.


Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Jim Yingst
Wanderer
Sheriff

Joined: Jan 30, 2000
Posts: 18671
Or divide by 1000. I'm sure it's one of those.


"I'm not back." - Bill Harding, Twister
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24168
    
  30

Multiply by 1,000,000, then divide by 1,000,000,000. Be careful of overflow.


[Jess in Action][AskingGoodQuestions]
Chris Ramsey
Ranch Hand

Joined: Sep 15, 2003
Posts: 34
Thank you all,
Like this?

[ December 13, 2003: Message edited by: Chris Ramsey ]
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24168
    
  30

Yep!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Convert milliseconds to seconds
 
Similar Threads
stacks
compute duration in seconds
Dates Difference
DATE/TIME
averaging time component of a calendar object