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

Share:
16,033
n92
Author by

n92

Updated on June 27, 2022

Comments

  • n92
    n92 almost 2 years

    I have given text field expression new.java.util.Date() and pattern MMMMM 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
    benka almost 10 years
    This is an incorrect answer. It's not the format that the OP asked for.
  • benka
    benka almost 10 years
    Moreover this is the 3rd question you are posting this exact same incorrect answer to.