get date time of given timestamb javascript code example Example: how to get timestamp in javascript of a date object new Date().getTime() new Date().valueOf()