Results 1 to 6 of 6
Thread: Covert time to seconds
- 04-08-2014, 09:48 PM #1
Member
- Join Date
- Mar 2014
- Posts
- 8
- Rep Power
- 0
- 04-08-2014, 09:57 PM #2
Re: Covert time to seconds
Use a SimpleDateFormat: SimpleDateFormat (Java Platform SE 7 )
How to Ask Questions the Smart Way
Static Void Games - GameDev tutorials, free Java and JavaScript hosting!
Static Void Games forum - Come say hello!
- 04-08-2014, 10:07 PM #3
Member
- Join Date
- Mar 2014
- Posts
- 8
- Rep Power
- 0
Re: Covert time to seconds
thanks but i got the logic
Java Code:int hr=t/3600; int mm=t%3600; mm=mm/60; int ss=t%3600; ss=ss/60; int time=(hr*10000)+(mm*100)+ss; return time;
- 04-08-2014, 11:37 PM #4
Re: Covert time to seconds
Can you explain what the problem is? How does what you have posted relate to getting time in a String in the format you want?
If you don't understand my response, don't ignore it, ask a question.
- 04-09-2014, 10:56 AM #5
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 14,422
- Blog Entries
- 7
- Rep Power
- 29
Re: Covert time to seconds
Do you mean 'time' as a duration or as a stamp, a mark, somewhere in the eons?
kind regards,
JosBuild a wall around Donald Trump; I'll pay for it.
- 04-09-2014, 11:24 AM #6
Just a guy
- Join Date
- Jun 2013
- Location
- Netherlands
- Posts
- 5,114
- Rep Power
- 13
Similar Threads
-
Time String to Seconds int
By willemuk in forum New To JavaReplies: 3Last Post: 03-07-2012, 07:22 PM -
Appending Seconds to Time
By reach2sudhakar in forum New To JavaReplies: 9Last Post: 10-15-2010, 10:00 AM -
Finding epoch seconds and separate yera,month,day,hr,min and seconds
By sathish kumar in forum New To JavaReplies: 4Last Post: 09-09-2010, 12:15 PM -
getting time elapsed in seconds
By ali_sakar in forum New To JavaReplies: 3Last Post: 03-06-2009, 09:37 AM -
measuring time in nano seconds
By Java Tip in forum Java TipReplies: 0Last Post: 11-06-2007, 01:11 PM
Bookmarks