I'm getting date from a rest service as
$scope.dob="1989-10-17 00:00:00"
How can I convert /apply filter to this date to look like normal date (without time).
I tried with splicing the time part but this is inside ng-repeat.It's not working
Please note the format date filter understands:
Date to format either as Date object, milliseconds (string or number) or various ISO 8601 datetime string formats (e.g. yyyy-MM-ddTHH:mm:ss.sssZ and its shorter versions like yyyy-MM-ddTHH:mmZ, yyyy-MM-dd or yyyyMMddTHHmmssZ). If no timezone is specified in the string input, the time is considered to be in the local timezone.
"1989-10-17 00:00:00" can't be parsed. Instead it should be: "1989-10-17T00:00:00Z"
{{ dob | date:'short' }}in the template? See docs.angularjs.org/api/ng/filter/date