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
angular.module('test'). 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:
How to search text in string using php ?29-10-2017 php search string search |
Remove last two characters from given string06-03-2017 substring javascript remove |
Change datepicker display format06-03-2017 datepicker angular js |
How to change background color and color to the text using javascript27-02-2017 css javascript colors |
Get Unique values from array/object in javascript19-02-2017 javascript unique remove repeated values from array |