Skip to content

Instantly share code, notes, and snippets.

@frknbasaran
Created November 3, 2015 09:11
Show Gist options
  • Save frknbasaran/3d8555a7c5497ae23e11 to your computer and use it in GitHub Desktop.
Save frknbasaran/3d8555a7c5497ae23e11 to your computer and use it in GitHub Desktop.
convert from 2015-11-02 13:20:56.387Z to 02/11/2015 13:20:56
module.exports = function (date) {
var year = date.substr(0,4);
var month= date.substr(5,2);
var day = date.substr(8,2);
var h = date.substr(11,2);
var m = date.substr(14,2);
var s = date.substr(17,2);
return day + "/" + month + "/" + year + " " + h + ":" + m + ":" + s;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment