Rails remove time from datetime attribute and group
ruby-on-rails
Solution
You can use `strftime` to show only year, month and date.
`<%= invoice.DATENEW.strftime('%Y-%m-%d') %> `
And for grouping, first show us what you've tried.
Problem
I have a column DATENEW in my invoices table. If in my view I use: ``` <td><%= invoice.DATENEW %></td> ``` it shows: ``` 2015-02-16 11:38:03 UTC ``` I need to display only year month and day. How can I do it?