package com.date; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class RelativeDateFormat { private static final long ONE_MINUTE = 60000L; private static final long ONE_HOUR = 3600000L; private stati
var time = '00:02:10'; var hour = time.split(':')[0]; var min = time.split(':')[1]; var sec = time.split(':')[2]; s = Number(hour*3600) + Number(min*60) + Number(sec); console.log(s);