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

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

jquery - ReferenceError: CKEDITOR is not defined -

android - Go back to previous fragment -