angularjs - Angular Date Format -
i getting date mar 30 2017 12:23am web service , need display 2017 mar 30.
i have tried {{order.created_date | date:'yyyy mmm dd'}}.
but output mar 30 2017 12:23am.
what issue?
something else must wrong code. date filter work in angular same way.
check date not being string since possible other scenario.
here's date filter working yyyy mmm dd format.
angular.module("app", []) .controller("ctrl", function($scope) { $scope.mydate = new date() $scope.stringdate = string($scope.mydate) }) <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script> <div ng-app="app" ng-controller="ctrl"> <pre>mydate: {{mydate | date: 'yyyy mmm dd'}}</pre> <pre>stringdate: {{stringdate | date: 'yyyy mmm dd'}}</pre> </div>
Comments
Post a Comment