Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Any java class to hold time duration ?

 
Pho Tek
Ranch Hand
Posts: 782
Chrome Python Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings,
I would like to store time duration as in hh:mm:ss
and be able to find out the difference between two
times. Which java class should I be using ?
Thanks
Pho
 
Marilyn de Queiroz
Sheriff
Posts: 9059
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Would it be simpler to find the differences in the time as milliseconds and subtract the milliseconds before converting to hh:mm:ss?
 
Pho Tek
Ranch Hand
Posts: 782
Chrome Python Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes I could possibly store it as a millisec. Although a
conversion will be needed as I get my inputs as a
string "hh:mm:ss". So is there a class that can take
a millisec and provide methods to retrieve it in the format
mentioned?
Pho
[This message has been edited by Pho Tek (edited October 09, 2001).]
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic