Description Usage Arguments Details Value Author(s) See Also Examples
Create string with SQL BETWEEN
expression for WHERE
clause to select dates
within the given range.
1 | date_between(column_name, date_range)
|
column_name |
[character(1)] |
date_range |
[Date(1:2)] |
column_name
must be a valid SQL identifier. It is validated to conform to
the regular expression returned by valid_identifier_regex
.
Character string to be used in SQL statement.
Uwe Block
1 2 3 4 5 6 7 8 9 10 11 12 13 | date1 <- as.Date("2016-02-22")
date2 <- as.Date("2016-02-11")
# SQL expression for a date range
(sql_expr1 <- lazysql::date_between("STD_1", c(date1, date2)))
# SQL expression for a single date
(sql_expr2 <- lazysql::date_between("STD_1", date1))
# sample SQL statements
paste("select * from TEST_TABLE where", sql_expr1)
paste("select * from TEST_TABLE where", sql_expr2)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.