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:
File Upload Using Angular Js and Node Js28-05-2018 AngularJs Node js file upload multer module |
Using slice remove last two characters from given string07-03-2017 slice remove |
Filter for change Date format (MM-dd-yyyy) in Angular Js05-03-2017 mm-dd-yyyy date formats angular js |
Filters for convert text to camel case in Angular Js05-03-2017 angularjs camelcase filters |
Call a function every second or 5 seconds in javascript22-02-2017 setinterval function calling |