aspose file tools*
The moose likes Java in General and the fly likes Number of Days, Hours and Minutes 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 "Number of Days, Hours and Minutes" Watch "Number of Days, Hours and Minutes" New topic
Author

Number of Days, Hours and Minutes

Ram Kas
Ranch Hand

Joined: Jul 26, 2006
Posts: 81
Hi All,

I want to calculate number of days, hours and minutes from number of milliseconds. Can you please tell me how I would do it.


Thanks in advance.

Dinakar.K
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3166
    
  10
Do you need to know the actual calculations to be done or do you need to know how to do these calculations in Java ?


Joanne
Ram Kas
Ranch Hand

Joined: Jul 26, 2006
Posts: 81
Hi Neal,

I want it in Java.

Thanks,
Dinakar.K
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3166
    
  10
The / operator will divide one number by another
Note that dividing a long by a long will give you a long as the answer - any fractional part will be lost.
e.g.

The % operator will give you the remainder after a division
e.g.


Does that help ?
[ December 01, 2006: Message edited by: Joanne Neal ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Number of Days, Hours and Minutes
 
Similar Threads
How To examine minutes parameter in Time class?
Java code for converting seconds into Days ,Hours and Minutes
How to parse the hours and mins string?
Date Calculations - Difference between 2 dates is off
Calculation displays scientific format instead of a whole number