Skip to content

Instantly share code, notes, and snippets.

@dbrugne
Created January 15, 2015 17:55
Show Gist options
  • Save dbrugne/84cb2845b10dc5fe4c70 to your computer and use it in GitHub Desktop.
Save dbrugne/84cb2845b10dc5fe4c70 to your computer and use it in GitHub Desktop.
Javascript full date and time string
// "20150115185533114"
var d = new Date();
var date = ''+d.getFullYear()+('0'+(d.getMonth()+1)).substr(-2, 2)+('0'+(d.getDate())).substr(-2, 2)+d.getHours()+d.getMinutes()+d.getSeconds()+d.getMilliseconds();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment