That should work. Put it in its own method if you want it to be cleaner.
Those methods are marked as deprecated in Java 5.0 - not sure what th suggested new way should be. I think it involves Calendar.
(aside: English note - "I want to compare two dates neglecting their timestamps", I'm not trying to be rude, there's a lot of English as a second language on The Ranch, and a lot of "what should I learn for a job interview", and better written and oral communications are at least as high as programming skills!, and their/there/they're is a common English problem, and a nitpick of many people (including me )
Bill Shirley - bshirley - frazerbilt.com
if (Posts < 30) you.read( JavaRanchFAQ);
Have you tried dividing the value returned by getTimeInMillis by the number of milliseconds in a day ? Try it for various Calendar objects that represent different times on the same day. Compare the results and see if you can see a way to make use of them.