The whole point of parameters is to prevent their values from being interpreted as SQL expressions.
To call an SQL function, you have to put it into the SQL string:
Cursor record = db.query(RECORD_TABLE, null,
"date(UTC_DATETIME,'localtime') = date('now', 'localtime')",
null,null,null,null);
Please note that the localtime
conversion affects both values in the same way, so you can omit it:
Cursor record = db.query(RECORD_TABLE, null,
"date(UTC_DATETIME) = date('now')",
null,null,null,null);
or even omit the first date
call if the UTC_DATETIME
column alread is in the correct yyyy-MM-dd
format:
Cursor record = db.query(RECORD_TABLE, null,
"UTC_DATETIME = date('now')",
null,null,null,null);