Answers for "timestamp milisecond js function"

9

javascript timestamp in seconds

const ts = () => Math.floor(new Date().getTime() / 1000);
Posted by: Guest on July-03-2020
1

convert date to timestamp javascript

const toTimestamp=(strDate)=>{
   var datum = Date.parse(strDate);
   return datum/1000;
}
console.log(toTimestamp('02/13/2009 23:31:30'));
Posted by: Guest on February-12-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language