0

How can I format a date to the format: 2001-08-22 03:04:05.000

I've been running into a bunch of issues trying to get this to work for some reason.

Thanks!

Jairo
  • 863
  • 7
  • 14
newguy222
  • 111
  • 1
  • 11
  • 2
    Does this answer your question? [Where can I find documentation on formatting a date in JavaScript?](https://stackoverflow.com/questions/1056728/where-can-i-find-documentation-on-formatting-a-date-in-javascript) – Dylan Jul 24 '20 at 23:33
  • `new Date().toLocaleString('en-CA',{hour12:false}).replace(',','')` – RobG Jul 25 '20 at 00:05

0 Answers0