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:

Simple Array Sum | Javascript |

07-05-2020 javascript arrays array sum

Use java script file client side and server side at a time in node js

30-07-2017 node js include call javascript

How to convert html to pdf in Node js

12-03-2017 pdf convert html node js

Call a function every second or 5 seconds in javascript

22-02-2017 setinterval function calling

Get Unique values from array/object in javascript

19-02-2017 javascript unique remove repeated values from array