actually the date is stored in this format in my db 2016-04-01 00:00:00 Now the thing is in listing i just want to show 2016-04-01 this part . i am using angularJS and php . I don't want to change db date format. Any help would be appreciated.
Asked
Active
Viewed 45 times
0
-
Please see the [angular date filter](https://docs.angularjs.org/api/ng/filter/date) – Igor Apr 04 '16 at 13:37
-
just `select date(dateColumn)` in your query – baao Apr 04 '16 at 13:37
-
1Possible duplicate of [How to format a date using ng-model?](http://stackoverflow.com/questions/14474555/how-to-format-a-date-using-ng-model) – Igor Apr 04 '16 at 13:38
-
well you need to post some code, although this can be done `date.split(' ')[0];` – Jai Apr 04 '16 at 13:44
-
actually i am rendering this date directly from the database in ngtable now just want to show only this part 2016-04-01 in ngtable – usman ahmad Apr 04 '16 at 13:46
-
As I mentioned above see the angular date filter. This is compatible with ngTable (which is also Angular). If you want more help post your ngtable html fragment. – Igor Apr 04 '16 at 13:47
1 Answers
3
You can use an angular filter for your dates.

Nick D
- 1,483
- 1
- 13
- 22
-
Welcome to Stack Overflow! Whilst this may theoretically answer the question, [it would be preferable](//meta.stackoverflow.com/q/8259) to include the essential parts of the answer here, and provide the link for reference. – Brian Ray Apr 04 '16 at 13:43