Hi people!
I'm stuck in a SQL code what's need a logic from a dateRangeInput.
Look my problem:
query <- glue(
"select
val_lim_escoamento as LE,
val_tensao_residual as TR
from
QT_QTS.PLA_ORDEM_PRODUCAO
where DIM_EXT_TUBO = {as.numeric(input$diametro)}
and DATE between 'DATE 1' AND 'DATE 2' <----- HERE IS THE PROBLEM ------
order by DTH_CRIACAO_REG desc")
df <- dbGetQuery(
connection_reportUser,
query
)
But, I don't have DATE 1 and DATE 2, I have just "dates" (the limit range between 2 dates), in my widget list:
dateRangeInput("dates",
label = ("Periodo"),
start = Sys.Date() - 90, end = Sys.Date() - 1,
format = "dd/mm/yyyy",
language = "pt-BR",
separator = "ate"
)
How can I solve this problem?