使用iReport将date参数转换为simpledate格式 [英] converting date parameter to simpledate format using iReport
问题描述
我有一个 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 $ c $的参数c>。
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屋!