I have an error message when I running sqldf package for datename or datepart. Here is the table I used.
Height Date
163 12/01/90
182 11/13/88
167 5/14/97
172 3/18/94
170 10/11/92
185 7/15/90
expected_table <-sqldf("select
[Height],
(datename(weekday,[Date])) AS [Day of Week]
from table1
")
Error in sqliteSendQuery(con, statement, bind.data) :
error in statement: no such column: weekday
If not,does it have any way to get weekday from the [Date]?
sqldf is a thin layer which passes the data and SQL statement to a back end of your choice. The default back end is sqlite but it also supports H2, PostgreSQL and MySQL. SQLite does not support
datename
but H2 does supportdayname
:giving:
Note: Of course it is also easy to do this in straight R:
giving: