Home > DeveloperSection > Forums > Convert the given time into milliseconds using Java
E E Cummings
E E Cummings

Total Post:26

Posted on    October-05-2013 9:22 AM

 Java Java 

 1 Reply(s)
 1327  View(s)
Rate this:

I am trying to convert the time (hh:mm:ss) into milliseconds. How could i do it?

Is it right to use the following one?

hh * mm * ss * 1000;

But if the minute is 00 or second is 00, it gives 0.

How do I calculate this?

Dag Hammarskjold
Dag Hammarskjold

Total Post:24

Posted on    October-05-2013 9:33 AM

You Should use this code: - (hh * 3600 + mm * 60 + ss) * 1000;

Don't want to miss updates? Please click the below button!

Follow MindStick