Simplest way to extract date from timestamp
<p>Consider the following timestamp</p>

<pre><code>timestamp &lt;- ymd_hms("2011-08-10 14:00:00", tz = "Pacific/Auckland")

&gt; timestamp
[1] "2011-08-10 14:00:00 NZST"
</code></pre>

<p>What is the simplest way to get the day part <code>2011-08-10</code> from it, and making sure this day is a proper date and not a string?</p>

<p>Using <code>lubridate::day(timestamp)</code> obviously fails here.</p>