SyntaxFix
Write A Post
Hire A Developer
Questions
You can use org.apache.commons.lang.time.DateUtils to make it cleaner:
org.apache.commons.lang.time.DateUtils
(firstDate.getTime() - secondDate.getTime()) / DateUtils.MILLIS_PER_SECOND