javascript - Properly formatting date for display in firefox -


i have date

$scope.newd = '2015-08-11 12:36:33.649';

coming backend json. in ui want display 11/08/2015.

i using date.parse($scope.newd) convert , format. not work in ff. how do this?

for cross-browser compatibility,

date string converted "-" "/" removing time,

 $scope.olddate = '2015-08-11 12:36:33.649';  $scope.newd= $filter('date')(new date($scope.olddate.split(" ")[0].replace(/-/g,"/")), 'dd/mm/yyyy'); 

refer link : http://dygraphs.com/date-formats.html


Comments

Popular posts from this blog

java - Date formats difference between yyyy-MM-dd'T'HH:mm:ss and yyyy-MM-dd'T'HH:mm:ssXXX -

c# - Get rid of xmlns attribute when adding node to existing xml -