Skip to content
Prev 343136 / 398513 Next

Sldf command returns negative value for date

On Thu, Aug 14, 2014 at 3:47 PM, Sneha Bishnoi <sneha.bishnoi at gmail.com> wrote:
This is a FAQ.   See #4 here: http://sqldf.googlecode.com .

The SQLite date function assumes its argument is a timestring but R
"Date" class variables are transferred to SQLite as days since
1970-01-01 so just add 1.

   sqldf("select * from mdata as m left join event on Datest+1 = Start")