I want to display date format like this 02-jan-2018
GET Method
$scope.allReport = function() {
$http({
method: 'GET',
url: 'api/admin/report'
}).success( function (data) {
$scope.data = data.data;
console.log($scope.data);
}).error(function (response){
console.log("error");
});
}
Response
0:{
created_at:"2018-03-02 00:00:00"
cuid:21
id:64
name:"my"
status:"D"
time:"07:01 PM"
updated_at:"2018-03-02 00:00:00"
}
1:{
created_at:"2018-03-02 00:00:00"
cuid:22
id:65
name:"my1"
status:"P"
time:"06:59 PM"
updated_at:"2018-03-02 00:00:00"
}
I display like this View
<tr ng-repeat="user in data | filter:{name:searchbyname}">
<td>{{$index+1}}</td>
<td>{{user.name}}</td>
<td>{{user.created_at | date : "dd-MMM-yyyy" }}</td>
<td>{{user.status}}</td>
</tr>
i want to display like created_at this in 02-jan-2018