How to extract just the date portion from a time in Rails? <p>I have the following piece of code currently in my view.</p> <p><strong>display.html.erb</strong></p> <pre><code>&lt;% @total_sales_volume.each do |record| %&gt; &lt;%= record.transaction_date %&gt; &lt;% end %&gt; </code></pre> <p>What gets displayed currently: <code>2016-02-23 00:00:00 UTC</code></p> <p>What I want to display: <code>2016-02-23</code></p>