如何比较iReport中的日期? [英] How to compare dates in iReport?

查看:312
本文介绍了如何比较iReport中的日期?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何比较iReport中的日期?我想使用Print When Expression ..

How to compare dates in iReport ? I want to use the "Print When Expression.."

类似于: $ F {date_from_table}< = $ F {another_date_from_table}? true:false

它应该有效。

正确的语法是什么?谢谢。

What is the correct syntax? Thanks.

推荐答案

尝试使用Date.before()或Date.after()方法。

如下所示

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

这篇关于如何比较iReport中的日期?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆