Question: How can I convert the date to 8th April 2016 format?

```
// in your controller:  
$scope.date = '20140313T00:00:00';

// in your view, date property, filtered with date filter and format 'MM dd yyyy' 

<div ng-bind="date | date:'MM dd yyyy'"></div>

```

Answer: 
in your angular controller

```
        $scope..DayofDate = "";
        $scope.Monthofdate = "";
        $scope.DaySuffix = "";
        $scope.getDateFormat = function (date) {
            var suffixes = ["th", "st", "nd", "rd"];            
            var dtfilter = $filter('date')(date, 'dd');
            $scope.DayofDate = dtfilter;
            var mtfilter = $filter('date')(date, 'MMM yyyy');
            $scope.Monthofdate = mtfilter;
            var day = parseInt(dtfilter.slice(-2));
            var relevantDigits = (day < 30) ? day % 20 : day % 30;
            var suffix = (relevantDigits <= 3) ? suffixes[relevantDigits] : suffixes[0];
            $scope.DaySuffix = suffix;           
        }

```

and in your html page

```
<div ng-init="getDateFormat(date)">
  <p>Date : {{DayofDate}} <sup>{{DaySuffix}}</sup>{{Monthofdate}}</p>
</div>

```
Try this out: 

```
<html>
<head> 
    <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.8/angular.min.js"></script>  
</head> 
<body ng-app="myApp" ng-controller="myCtrl"> 

{{myDate | date: 'dd MMM yyyy'}}
<script>
//Module Declaration
var app = angular.module('myApp',[]);
//Controller Declaration
app.controller('myCtrl',function($scope){
    $scope.myDate="20140313T00:00:00";
});
</script> 
</body> 
</html> 

```

See this doc for further details: <https://docs.angularjs.org/api/ng/filter/date>