Thanks for the reply. I used moment.js and it's converting the date, but is there any other alternative option which parse and change to the desired date format from string format.
On Tuesday, February 17, 2015 at 7:17:18 PM UTC+5:30, Atul Vani wrote: > > The 'Date' is not a date object but a string. Use datejs or momentjs to > convert it to date. > > On Tue, Feb 17, 2015 at 5:52 PM, Rakesh Yeluri <[email protected] > <javascript:>> wrote: > >> Hi All, >> >> I have scope property which have below format in my controller, >> >> $scope.event = { >> name : 'xyz', >> city : 'Florida', >> sessions: [ >> { >> exp: '5', >> UpvoteCount : 2, >> Date: '10/12/2015' >> }, >> { >> exp: '2', >> UpvoteCount: 5, >> Date: '1/12/2015' >> }, >> { >> exp: '1', >> UpvoteCount: 8, >> Date: '15/12/2015' >> } >> ] >> } >> >> and in the view, I'm trying to fetch in the below format, >> >> <li ng-repeat="x in event.sessions"> >> {{ x.Date | date:'MM-dd-yyyy' }} >> </li> >> >> >> Output I'm getting like below: >> 10/12/2015 >> >> 1/12/2015 >> >> 15/12/2015 >> >> Can some one address/suggest why the format is not applying to the date. >> >> Thanks >> >> -- >> You received this message because you are subscribed to the Google Groups >> "AngularJS" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at http://groups.google.com/group/angular. >> For more options, visit https://groups.google.com/d/optout. >> > > -- You received this message because you are subscribed to the Google Groups "AngularJS" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/angular. For more options, visit https://groups.google.com/d/optout.
