The time I got is a string type Feb 21, 2017 5:10:09 PM
I want to format this character into "yyyy-MM-dd"
It is useless to write like this: {{data.time | date:'yyyy-MM-dd'}}
Solve
巴扎黑2017-05-15 17:14:40
var time = new Date("Feb 21, 2017 5:10:09 PM") ;
var YMD = $filter('date')(time, 'yyyy-MM-dd');