Answers for "how to remove am pm from time in javascript"

4

js get time in am

var time = new Date();
console.log(
  time.toLocaleString('en-US', { hour: 'numeric', hour12: true })
);
Posted by: Guest on April-28-2020
0

js date remove am and pm

var ampm = hours >= 12 ? 'pm' : 'am';
Posted by: Guest on December-14-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language