aspose file tools*
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
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: 24187
    
  34

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: 24187
    
  34

Yep!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Convert milliseconds to seconds