0

Trying to get time from date object in javascript in this format without second, e.g) "3:18" or "15:18" if pm. So date object is Tue Jun 09 2020 00:00:00 GMT-0400 (Eastern Daylight Time) Please help me with this

see
  • 61
  • 4
  • https://www.w3schools.com/js/js_date_methods.asp – nelek Jun 10 '20 at 16:59
  • I tried that that does not work – see Jun 10 '20 at 17:04
  • `new Date().toLocaleString('default',{hour:'numeric',minute:'2-digit',hour12:false})`. See [*How to format a JavaScript date*](https://stackoverflow.com/questions/3552461/how-to-format-a-javascript-date?r=SearchResults&s=1|1450.4192) – RobG Jun 10 '20 at 20:40

0 Answers0