JSFiddle - React, Tailwind, and code Playground

by Frank Liu

JavaScript

let t1 = "2019-09-19 10:26:40";
let t2 = "2019-09-19 10:26:41";

let t1parse = Date.parse(t1);
let t2parse = Date.parse(t2);

console.log('t1 = ', t1parse);

console.log('t2 = ', t2parse);

console.log(Math.abs(t1parse-t2parse));