I am currently working on a Mailbox for a website, holding a large number of messages within a database, where there is an option to filter the mails according to th
I suggest first that you maintain the records in the table sorted by date. Doing so, allows you to not need to compare every value, but you can use binary search to find the two boundaries (begin and end) of records with the desired date. I would also use the time stamp. If you store is as timesstamp and not as text, it will be number, and its very fast at doing the comparison.