I am trying to reformat a date that I am getting from an API. In the object I have:
created_at: \"2013-06-13T16:29:55.245Z\"
I would like
No need to modify the original string, you can just use it like this:
alert(moment("2013-06-13T16:29:55.245Z").format("M/DD/YYYY"));
Works well: http://jsfiddle.net/K5ub8/2/