var _time = $("#txtStartTime").val(); var weekArray = new Array("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"); var week = weekArray[new Date(_time).getDay()];