How to create a single expression displaying time difference between two Date's as years, months, days, hours, minutes, seconds
问题 How can I create a single jasper report JRExpression that visualize the difference between two java.util.Date in format yy year(s) month(s) dd day(s), hh hour(s), mm minute(s), ss second(s) java.util.Date startDate java.util.Date endDate A JRExpression is a single line where variable declaration is not allowed, however you may use conditional statements using syntax boolean ? yes:no , for you who are not familiar imagine one line of System.out.println(); Example of desired output (if you have