I have connected to an oracle database using R, I can perform queries on it but I'm having a problem with performing queries on a date column. I want to get the rows where a certain date column (INLDATE) is ranged between today and 7 days from now.
Other queries I performed with the dplyr package, like this;
tbl(con, 'UNIT') %>% select(SEQ) %>% filter(SEQ > 203)
This works perfectly fine, however when I try something like
Today <- Sys.Date()
tbl(con, 'UNIT') %>% select(INLDATE) %>% filter(INLDATE > Today)
or even
tbl(con, 'UNIT') %>% select(INLDATE) %>% filter(INLDATE > 2021-04-04)
it gives me errors that it expects a DATE but it's being interpreted as a number or a string
What is the correct way to do this? Thanks in advance!