JSFiddle - React, Tailwind, and code Playground

by Carl Angelo Nievarez

JavaScript

var valuestart = '09/16/2017 11:46 AM';
var valuestop = '09/16/2017 6:49 PM';

//create date format          
var timeStart = new Date("01/01/2007 " + valuestart).getHours();
var timeEnd = new Date("01/01/2007 " + valuestop).getHours();

var hourDiff = timeEnd - timeStart;    

alert(hourDiff)