as.Date showing character string in unambiguous format even when strptime specified R
<p>I have this date column of form:</p>

<pre><code>20160812
20160813
</code></pre>

<p>Basically YYYYMMDD.</p>

<p>I converted it to a date using strptime and as.Date</p>

<pre><code>weather_dataset$DATE = as.Date(weather_dataset$DATE,"%Y%m%d")
</code></pre>

<p>But I get</p>

<pre><code>Error in charToDate(x) : 
  character string is not in a standard unambiguous format
</code></pre>

<p>Huh? I've clearly specified the format to use, but its still throwing me this error for some reason. Would appreciate help! :) </p>

<p>Thank you!</p>