Home Ask Login Register

Developers Planet

Your answer is one click away!

Jen143Me February 2016

DateFormat in angularjs

I wanted to achieve this format: "Saturday, August 30, 2014"

I have this code in my view:


And the result looks like this:


What should I do in my controller or in the view? Thanks.


rkalita February 2016

First of all you date should be in correct format

Use datefilter from angular {{masterlist.created_date | date:'fullDate'}}

Here is the doc

ashfaq.p February 2016

Angular provides many filters, among them one is for date. It provides various format to format your date. Read about them here: date filter: angularjs

But filters can prove performance bottleneck, so its better to avoid them nd format your date on server side.

Post Status

Asked in February 2016
Viewed 2,332 times
Voted 6
Answered 2 times


Leave an answer

Quote of the day: live life