Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I want to create a function that will convert the 24hr into milliseconds.
e.g 14:00 into milliseconds?
14:00
You could do something like this.
var hours = "14:00"; var array = hours.split(":"); //splits into two 1. hours 2. minutes var milliSec = array[0]*60*60*1000 + array[1]*60*1000; //result - 50400000