使用iReport将date参数转换为simpledate格式 [英] converting date parameter to simpledate format using iReport

查看:280
本文介绍了使用iReport将date参数转换为simpledate格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 startDate 和一个 endDate 作为输入参数。
此参数在查询中使用说:

I have a startDate and an endDate as an input parameters. This parameters are used in the query say:

SELECT * FROM patientRecords 
WHERE patientRecords.dateOfdischarge BETWEEN $P{startDate} AND $P{endDate} 

现在,自从 startDate endDate 是传递给 JasperReports

Now, since the startDate and endDate are the parameters which are passed to the JasperReports.

我必须确保它们在 mm / dd / yyyy 日期格式。

I have to ensure that they are in mm/dd/yyyy Date format.

如何使用 iReport 将输入参数转换为此格式?

How do I go about converting the input parameter to this format using iReport?

推荐答案

您可以尝试更改属性> textfield属性中的patern,或者您可以尝试将此to_char(tablename.fieldname,'mm / dd / yyyy')作为fieldname

U can try change the patern from propertise>textfield propertise or u can try this to_char(tablename.fieldname, 'mm/dd/yyyy') as fieldname

这篇关于使用iReport将date参数转换为simpledate格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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