date - AngularJS Dateformatting -
i date in format:
2015-02-19 00:00:00
now need format date to
19-02-2015
i tried:
sc.documents.datestring = $filter("date")('2015-02-19 00:00:00', 'dd-mm-yyyy');
but didn't work, have idea of how this?
first argument should date object, not string. yon need is:
sc.documents.datestring = $filter("date")(new date('2015-02-19 00:00:00'), 'dd-mm-yyyy');
Comments
Post a Comment