sql-builder icon indicating copy to clipboard operation
sql-builder copied to clipboard

Where Clause With TO_DATE

Open IdemenB opened this issue 4 years ago • 0 comments

Hi, I've been trying to find the proper input to make a query for some columns where a timestamptz field is less than today.

For the column field DATE() SQL function works properly, but for value what should be the input?

let now: DateTime<Local> = Local::now();
let generated_query = &base_select_statement
                .and_where_le("DATE(duedate)",&("TO_DATE(**?????**)"))

Anyone already took care of this scenario?

IdemenB avatar May 11 '21 12:05 IdemenB