Hi,
I am using Jaspersoft 6.16. I have a field STARTDATE, retrieving data from a table in the database. The field type in the database is date. Now when I am previewing the report it shows data as (MM/DD/YYYY, TIMESTAMP). But i want it as (DD/MM/YYYY) only.
Please suggest an easy and step-by-step solution. Thanks
1 Answer:
Posted on June 23, 2022 at 4:36am
There are multiple ways to do that date formatting.
1. Use the "Pattern" field on the "Text Field" tab. The ... can help with many different formats
2. Create an expression with the formatting built-in using SimpleDateFormat()
new SimpleDateFormat( "dd/MM/yyyy").format($F{MySqlDate})