• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Number of Days, Hours and Minutes

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you need to know the actual calculations to be done or do you need to know how to do these calculations in Java ?
 
Ram Kas
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Neal,

I want it in Java.

Thanks,
Dinakar.K
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
    Bookmark Topic Watch Topic
  • New Topic