R: Date function in sqldf giving unusual answer (wrong date format?)
<p>I am trying to add to a date using sqldf, i know it should be simple but I can't figure out what is wrong with my date format. Using:</p>

<pre><code>sqldf("select date(model_date, '+1 day') from lapse_test")
</code></pre>

<p>give's answers like '-4666-01-23'</p>

<p>The model_date's are in the date format  and look like 2015-01-01</p>

<p>I previously made them from a character string ('12/1/2015') using</p>

<pre><code>lapse_test$model_date &lt;- as.Date(lapse_test$date1,format = "%m/%d/%Y") or
lapse_test$model_date &lt;- as.POSIXCT(lapse_test$date1,format = "%m/%d/%Y")
</code></pre>

<p>I'm guessing this is the problem? Any ideas?</p>