I have dynamic string with a HH:mm:ss format (e.g. 18:19:02). How can the string be converted into a JavaScript Date object (in Internet Explorer 8
HH:mm:ss
18:19:02
Try this (without jQuery and a date object (it's only a time)):
var pieces = "8:19:02".split(':') hour, minute, second; if(pieces.length === 3) { hour = parseInt(pieces[0], 10); minute = parseInt(pieces[1], 10); second = parseInt(pieces[2], 10); }