Skip to content

Date/Time condition #72

Open
Open
@Thaybow

Description

@Thaybow

Hello,

Does someone can tell me what am I doing wrong ?

DB is installed. The field 'completed' in table is a TEXT (and I have also tried with a DATE).

Trying to do this:

async delete() { const db = await this.getInstance(); await db.transaction((tx) => { const sql = 'DELETE FROM my_table WHERE (completed < DATE(\'now\', \'-1 minute\'))'; tx.executeSql(sql, [], (tx, res) => { console.log('removed'); }, function(tx, error) { console.log('DELETE error: ' + error.message); }); }); }

I can delete everything without the WHERE condition, but I'm stuck when I try to filter with this WHERE (completed < DATE('now', '-1 minute'))

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions