NickName:san Ask DateTime:2018-03-27T14:45:13 using date.js to combine date, time and convert to unix timestamp in javascript I have two values var date = "2012-08-10"; var time = "10:10"; Then I do var dte = date + " " + time; and var dte = new Date(dte).getTime() / 1000; The below link says it needs date.js to give right reults Converting Date and Time To Unix Timestamp Can the above code give right results without date.js Copyright Notice:Content Author:「san」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.Link to original article:https://stackoverflow.com/questions/49506020/using-date-js-to-combine-date-time-and-convert-to-unix-timestamp-in-javascript Answers