Topic on Talk:Quarry

How to search for range of dates?

2
RoySmith (talkcontribs)

I want to search ipblocks for a range of expiry dates. I'm doing:


select ipb_address, ipb_expiry from ipblocks

where ipb_user = 0

and ipb_expiry != 'infinity'

and ipb_expiry > '20221001000000'

and ipb_expiry < '20221008000000'

limit 10;


which returns 0 rows. I'm assuming it's got something to do with ipb_expiry being a varbinary?

This is https://quarry.wmcloud.org/query/68543

RoySmith (talkcontribs)

It turned out the query is working perfectly. There just weren't any blocks expiringing in that date range. I widened out the range and it works fine. Dooh!