Muhammed Almaz
Muhammed Almaz

Reputation: 55

Android SQLite is it today

This my Table codes

CREATE TABLE  InformationTable"
            + "(ID INTEGER, "
            + " ConfirmDate TEXT , "
            +" Counter INTEGER DEFAULT 99999"
            +" )";

I want to a select query about InformationTable. I want to create query like this ;

Select * from InformationTable where datetime(ConfirmDate) IS IT TODAY()

How can i do it ?

Upvotes: 1

Views: 57

Answers (1)

Diego Torres Milano
Diego Torres Milano

Reputation: 69218

If your date is stored as TEXT ISO8601 strings ("YYYY-MM-DD HH:MM:SS.SSS"), to select the rows for today:

select * from InformationTable where date(ConfirmDate) == date('now');

Upvotes: 1

Related Questions