Filter for change Date format (MM-dd-yyyy) in Angular Js

date formats
angular js

By using below filter for change Date format (MM-dd-yyyy) in Angular Js, for given date.
Ex : 2017-03-05 08:40:00. By using the below filter the final result is 03-05-2017

filter('ChangeDateFormat', function($filter)
	return function(input)
		if(input == null){ return ""; }
		var _date = $filter('date')(new Date(input), 'MM-dd-yyyy');
		return _date;



You might also like:

Compare the Triplets | Javascript |


How to upload file by using request module

18-03-2017 request module node js

Sanitization in java sript

14-03-2017 sanitization java script

How to convert html to pdf in Node js

12-03-2017 pdf convert html node js

Change datepicker display format

06-03-2017 datepicker angular js