Answers for "javascript log Time from Date"

0

javascript log Time from Date

const timeFromDate = date => date.toTimeString().slice(0, 8);

console.log(timeFromDate(new Date(2021, 0, 10, 17, 30, 0))); 
// Result: "17:30:00"
Posted by: Guest on September-28-2021

Code answers related to "javascript log Time from Date"

Code answers related to "Javascript"

Browse Popular Code Answers by Language