time converter js code example Example: convert date and time into epoch javascript var someDate = new Date(dateString); someDate = someDate.getTime();