In AngularJs I get a date in this format : ["2018-01-03T09:30:54.264Z"]. I want it to be in the format : "2018-01-03T09:30:00" How can I get it in this format?
Controller.js
var myDate = new Date();
$scope.form.date.push(myDate);
template
<div class="col-lg-12 photo-container" ng-repeat="photo in selectedPhotos track by $index" ng-if="add">
<input id="myDate" type="datetime-local" name="date[]" ng-model="form.date[$index]">
<img ng-src="{{photo}}" class="thumb">
</div>