Facing trouble in retrieving relevant records
Posted
by Umaid
on Stack Overflow
See other posts from Stack Overflow
or by Umaid
Published on 2010-05-02T07:22:46Z
Indexed on
2010/05/02
7:27 UTC
Read the original article
Hit count: 154
sql
SELECT * from MainCategory where Month = 'May' and Day in ((cast(strftime('%d',date('now','-1 day')) as Integer)),(cast(strftime('%d',date('now')) as Integer)),(cast(strftime('%d',date('now','+1 day')) as Integer)));
Whenever I run this query in sqlite so it returns me 33 records instead of 3. I am insterested in fetching on 3 records of the current month but unable to do so, so plz assist.
--Please note: if you can't assist so plz don't post irrelevant answer.
I have also modified and try to make it simple but not achieve
Select day, month from MainCategory where Month = 'May' and day in ((date('now','-1 day')),(date('now')),(date('now','+1 day')))
© Stack Overflow or respective owner