问题
How to compare dates in iReport ? I want to use the "Print When Expression.."
Something like : $F{date_from_table} <= $F{another_date_from_table} ? true : false
It should work .
What is the correct syntax? Thanks.
回答1:
Try to use Date.before() or Date.after() method.
Like below
($F{date_from_table}.before($F{another_date_from_table}) || $F{date_from_table}.equals($F{another_date_from_table})) ? true : false
来源:https://stackoverflow.com/questions/31256124/how-to-compare-dates-in-ireport