Reputation: 1538
I have a report designed in iReport with an integer field and it is displaying like:
End date
20171022
20170906
20170903
but I need to show this field in date format like:
22/10/2017
06/09/2017
03/09/2017
The 20171022 value at DB means the 22 October of 2017 date
Is there any way to do this?
Upvotes: 0
Views: 1095
Reputation: 1256
You can use below expression to achieve your desired result.
$F{column_name}.toString().substring(6,8) + "/" + $F{column_name}.toString().substring(4,6) + "/" + $F{column_name}.toString().substring(0,4)
You can handle the same inside your query. You just have to convert above expression as per your selected database.
Upvotes: 1