Jump to content
Changes to the Jaspersoft community edition download ×

How can i display date format like "7-NOV-2019'?


kuhazwan7

Recommended Posts

I already change the java class into java.util.Date and change the pattern for that field into the format that i want but nothing happened.. i also set the pattern expression like this "new SimpleDateFormat("dd/MM/yyyy").format($F{yourdatefield})" but still cannot get the answer.. Hope any of you guys can help me :(

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Hi hi~

probably make sure the data field from dataset is java.sql.date
and i think better use 'pattern' than 'pattern expression' in the properties

so..
-click on the text field
-in the properties theres 'text field' tab
-in the pattern, u can choose the date option there or custom it by combining some format or just type 'dd-MMM-yyyy'

the pattern there are quite different from usual, so please take a look at https://community.jaspersoft.com/wiki/date-and-time-patterns to understand it.
simply 'd' is for day, 'D' is not -- 'M' is for month, 'm' is not -- etc, look above.

wish u did well on ur project! - TV

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...