Created
November 3, 2015 09:11
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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