Skip to content

Instantly share code, notes, and snippets.

@fkulakov
Last active December 26, 2021 01:40
Show Gist options
  • Save fkulakov/3c022d0f5abc28baa99eca1d291e8f59 to your computer and use it in GitHub Desktop.
Save fkulakov/3c022d0f5abc28baa99eca1d291e8f59 to your computer and use it in GitHub Desktop.
Y-m-d H:i:s date format in JavaScript
new Date().toJSON().split('.')[0].split('T').join(' ');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment