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

Dream jobs list

4w5 and 5w4: science and art

How to open Faber-Castell Pitt Artist Pens