开发者

Filter emails by date using hours and minutes

开发者 https://www.devze.com 2023-02-17 02:56 出处:网络
I\'m trying to get all mail that I receive after some date. But folder.search( returns all of them. Even if I specify ComparisonTerm.EQ

I'm trying to get all mail that I receive after some date. But folder.search( returns all of them. Even if I specify ComparisonTerm.EQ

开发者_Go百科Folder folder = getInboxFolder();
ReceivedDateTerm dateTerm = new ReceivedDateTerm(ComparisonTerm.EQ, new Date());
Message[] messages = folder.search(dateTerm);

How I should correct my code?

UPD It seems that it make job right with year/month/day comparation, but what about hours and minutes? I should care about them too.


Unfortunally looks like it's not possible to do so. check this thread: Click here!

0

精彩评论

暂无评论...
验证码 换一张
取 消