Use paste
to dynamically write your query:
x<-'2012-12-01'
query <- paste("**** where date between '",x,"' and '2012-12-31'",sep='')
This will creates a query like:
"**** where date between '2012-12-01' and '2012-12-31'"
Then
rs <- dbGetQuery(db,query)