Skip to content

Where Clause With TO_DATE #9

@IdemenB

Description

@IdemenB

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions