How to get the current date/time in Javascript: YYYY-MM-DD HH:MM:SS format

Because I'm tired of having to google it every time. Note that this will be in military time:

new Date().toISOString().replace(/T/, ' ').replace(/\..+/, '');

Comments

Popular posts from this blog

Unleashing my inner Disney Princess ✩₊˚.⋆☾⋆⁺₊✧ at the 2024 Disney Princesses Half Marathon

The 20-something types of Computer Science majors

The Evenstar