How to change the date format in Ireport 4.5
16,033
new SimpleDateFormat("MMM dd, yyyy ").format(new Date())
Put the above line in text field so you will get your Date format
Author by
n92
Updated on June 27, 2022Comments
-
n92 almost 2 years
I have given text field expression
new.java.util.Date()
and patternMMMMM dd, yyyy
as the mentioned format.The date must display like:
jan 13, 2012
but it's displaying in some other format:Fri Jan 13 08:30:12 IST 2012
.So how to print the date in the mentioned format. And one thing in preview the date displays correctly as mentioned but inside my application it displays
Fri Jan 13 08:30:12 IST 2012
format. Is there any way to make it to work properly? -
benka almost 10 yearsThis is an incorrect answer. It's not the format that the OP asked for.
-
benka almost 10 yearsMoreover this is the 3rd question you are posting this exact same incorrect answer to.