Skip to content

Instantly share code, notes, and snippets.

@meysampg
Created August 31, 2019 12:41
Show Gist options
  • Select an option

  • Save meysampg/b74c91ea07e1d162eb35cf40cd59a46f to your computer and use it in GitHub Desktop.

Select an option

Save meysampg/b74c91ea07e1d162eb35cf40cd59a46f to your computer and use it in GitHub Desktop.
return a ready to use timestamp for SQL
new Date().toISOString().split('.')[0].split('T').join(' ')
# "2019-08-31 12:40:44"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment